[
https://issues.apache.org/jira/browse/FLINK-37800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yang Zhou updated FLINK-37800:
------------------------------
Description:
When using jobmanager-pod-template to deploy a Native Kubernetes Application
Job, an error message appears in the log: 'Invalid value:
"/opt/flink/artifacts": must be unique,'
Caused by:
org.apache.flink.kubernetes.shaded.io.fabric8.kubernetes.client.KubernetesClientException:
Failure executing: POST at:
[https://192.168.0.137:6443/apis/apps/v1/namespaces/flink/deployments].
Message: Deployment.apps "flink-application-test" is invalid:
spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value:
"/opt/flink/artifacts": must be unique. Received status: Status(apiVersion=v1,
code=422,
details=StatusDetails(causes=[StatusCause(field=spec.template.spec.containers[0].volumeMounts[4].mountPath,
message=Invalid value: "/opt/flink/artifacts": must be unique,
reason=FieldValueInvalid, additionalProperties={})], group=apps,
kind=Deployment, name=flink-application-test, retryAfterSeconds=null, uid=null,
additionalProperties={}), kind=Status, message=Deployment.apps
"flink-application-test" is invalid:
spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value:
"/opt/flink/artifacts": must be unique, metadata=ListMeta(_continue=null,
remainingItemCount=null, resourceVersion=null, selfLink=null,
additionalProperties={}), reason=Invalid, status=Failure,
additionalProperties={}).
The Native Job deployed by ./flink run-application will create an
EmptyDirVolume named 'user-artifacts-volume' and mount it to the Pod's
'/opt/flink/plugins' path
!image-2025-05-14-13-24-09-514.png!
. Obviously this will conflict with my jobmanager-pod-template, which is as
follows:
containers:
# Do not change the main container name
- name: flink-main-container
resources:
requests:
ephemeral-storage: 2048Mi
limits:
ephemeral-storage: 2048Mi
volumeMounts:
- mountPath: /opt/flink/artifacts
name: flink-artifact
# 新增的 volumeMounts
- mountPath: /opt/flink/lib
name: flink-19-lib
- mountPath: /opt/flink/plugins
name: flink-19-plugins
- mountPath: /opt/flink/log
name: flink-19-log
volumes:
- name: flink-artifact
emptyDir: \{ }
was:
When using jobmanager-pod-template to deploy a Native Kubernetes Application
Job, an error message appears in the log: 'Invalid value:
"/opt/flink/artifacts": must be unique,'
Caused by:
org.apache.flink.kubernetes.shaded.io.fabric8.kubernetes.client.KubernetesClientException:
Failure executing: POST at:
https://192.168.0.137:6443/apis/apps/v1/namespaces/flink/deployments. Message:
Deployment.apps "flink-application-test" is invalid:
spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value:
"/opt/flink/artifacts": must be unique. Received status: Status(apiVersion=v1,
code=422,
details=StatusDetails(causes=[StatusCause(field=spec.template.spec.containers[0].volumeMounts[4].mountPath,
message=Invalid value: "/opt/flink/artifacts": must be unique,
reason=FieldValueInvalid, additionalProperties={})], group=apps,
kind=Deployment, name=flink-application-test, retryAfterSeconds=null, uid=null,
additionalProperties={}), kind=Status, message=Deployment.apps
"flink-application-test" is invalid:
spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value:
"/opt/flink/artifacts": must be unique, metadata=ListMeta(_continue=null,
remainingItemCount=null, resourceVersion=null, selfLink=null,
additionalProperties={}), reason=Invalid, status=Failure,
additionalProperties={}).
The Native Job deployed by ./flink run-application will create an
EmptyDirVolume named 'user-artifacts-volume' and mount it to the Pod's
'/opt/flink/plugins' path
!native-resource://sdk/image?resource_type=image&key=img_v3_02m9_7c84f4c9-df5d-4ab2-8739-936de23bcadg!
. Obviously this will conflict with my jobmanager-pod-template, which is as
follows:
> When using jobmanager-pod-template to deploy a Native Kubernetes Application
> Job, an error message appears in the log: 'Invalid value:
> "/opt/flink/artifacts": must be unique,'
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: FLINK-37800
> URL: https://issues.apache.org/jira/browse/FLINK-37800
> Project: Flink
> Issue Type: Bug
> Components: Deployment / Kubernetes
> Affects Versions: 1.19.2
> Environment: Flink version: 1.19.2, use Flink Cli submit Native
> Kubernetes Application Model Job
> Reporter: Yang Zhou
> Priority: Minor
> Attachments: image-2025-05-14-13-24-09-514.png
>
>
> When using jobmanager-pod-template to deploy a Native Kubernetes Application
> Job, an error message appears in the log: 'Invalid value:
> "/opt/flink/artifacts": must be unique,'
> Caused by:
> org.apache.flink.kubernetes.shaded.io.fabric8.kubernetes.client.KubernetesClientException:
> Failure executing: POST at:
> [https://192.168.0.137:6443/apis/apps/v1/namespaces/flink/deployments].
> Message: Deployment.apps "flink-application-test" is invalid:
> spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value:
> "/opt/flink/artifacts": must be unique. Received status:
> Status(apiVersion=v1, code=422,
> details=StatusDetails(causes=[StatusCause(field=spec.template.spec.containers[0].volumeMounts[4].mountPath,
> message=Invalid value: "/opt/flink/artifacts": must be unique,
> reason=FieldValueInvalid, additionalProperties={})], group=apps,
> kind=Deployment, name=flink-application-test, retryAfterSeconds=null,
> uid=null, additionalProperties={}), kind=Status, message=Deployment.apps
> "flink-application-test" is invalid:
> spec.template.spec.containers[0].volumeMounts[4].mountPath: Invalid value:
> "/opt/flink/artifacts": must be unique, metadata=ListMeta(_continue=null,
> remainingItemCount=null, resourceVersion=null, selfLink=null,
> additionalProperties={}), reason=Invalid, status=Failure,
> additionalProperties={}).
> The Native Job deployed by ./flink run-application will create an
> EmptyDirVolume named 'user-artifacts-volume' and mount it to the Pod's
> '/opt/flink/plugins' path
> !image-2025-05-14-13-24-09-514.png!
> . Obviously this will conflict with my jobmanager-pod-template, which is as
> follows:
> containers:
> # Do not change the main container name
> - name: flink-main-container
> resources:
> requests:
> ephemeral-storage: 2048Mi
> limits:
> ephemeral-storage: 2048Mi
> volumeMounts:
> - mountPath: /opt/flink/artifacts
> name: flink-artifact
> # 新增的 volumeMounts
> - mountPath: /opt/flink/lib
> name: flink-19-lib
> - mountPath: /opt/flink/plugins
> name: flink-19-plugins
> - mountPath: /opt/flink/log
> name: flink-19-log
> volumes:
> - name: flink-artifact
> emptyDir: \{ }
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)