[
https://issues.apache.org/jira/browse/FLINK-22158?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17320132#comment-17320132
]
Robert Metzger commented on FLINK-22158:
----------------------------------------
I tested the following:
- checked the docs
- used the template in the docs to set up a Flink session on K8s with a custom
init container that downloads a dependency
- used some invalid values in the process, got a good exception
- successfully deployed a Flink JobManager with the configured init container
- a started TaskManager also had the init container configured and executed
One thing I stumbled across is that If I do not configure
{{flink-main-container}}, but a different name, I get this hard to understand
error message:
{code}
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure
executing: POST at:
https://127.0.0.1:55017/apis/apps/v1/namespaces/default/deployments. Message:
Deployment.apps "my-first-flink-cluster" is invalid:
spec.template.spec.containers[0].image: Required value. Received status:
Status(apiVersion=v1, code=422,
details=StatusDetails(causes=[StatusCause(field=spec.template.spec.containers[0].image,
message=Required value, reason=FieldValueRequired, additionalProperties={})],
group=apps, kind=Deployment, name=my-first-flink-cluster,
retryAfterSeconds=null, uid=null, additionalProperties={}), kind=Status,
message=Deployment.apps "my-first-flink-cluster" is invalid:
spec.template.spec.containers[0].image: Required value,
metadata=ListMeta(_continue=null, remainingItemCount=null,
resourceVersion=null, selfLink=null, additionalProperties={}), reason=Invalid,
status=Failure, additionalProperties={}).
{code}
I wonder if we should check if this container name is specified in the YAML
file, and fail if it is not set?
> Test native Kubernetes pod template
> -----------------------------------
>
> Key: FLINK-22158
> URL: https://issues.apache.org/jira/browse/FLINK-22158
> Project: Flink
> Issue Type: Test
> Components: Deployment / Kubernetes
> Affects Versions: 1.13.0
> Reporter: Yang Wang
> Assignee: Robert Metzger
> Priority: Blocker
> Labels: release-testing
> Fix For: 1.13.0
>
>
> Flink allows users to define the JobManager and TaskManager pods via template
> files. This allows to support advanced features(e.g. init-container, sidecar
> container, volume mount, etc.) that are not supported by Flink Kubernetes
> config options directly. Use {{kubernetes.pod-template-file}} to specify a
> local file that contains the pod definition. It will be used to initialize
> the JobManager and TaskManager.
>
> The documentation about how to start a session/application cluster with pod
> template could be found here[1].
>
> [1].
> https://ci.apache.org/projects/flink/flink-docs-master/docs/deployment/resource-providers/native_kubernetes/#pod-template
--
This message was sent by Atlassian Jira
(v8.3.4#803005)