我在使用k8s部署的时候也是按照官网的方式[1],是正常使用的, 然后后面加了volume配置
{ ... "spec": { ... "template": { ... "spec": { "volumes": [ ... { "name": "libs-volume", "hostPath": { "path": "/data/volumes/flink/jobmanager/cxylib", "type": "" } }, ... ], "containers": [ { ... "volumeMounts": [ { "name": "flink-config-volume", "mountPath": "/opt/flink/conf" }, ... ], ... } ], ... } }, ... }, ... } 然后启动jobmanager报错 Starting Job Manager sed: couldn't open temporary file /opt/flink/conf/sedz0NYKX: Read-only file system sed: couldn't open temporary file /opt/flink/conf/sede6R0BY: Read-only file system /docker-entrypoint.sh: 72: /docker-entrypoint.sh: cannot create /opt/flink/conf/flink-conf.yaml: Permission denied /docker-entrypoint.sh: 91: /docker-entrypoint.sh: cannot create /opt/flink/conf/flink-conf.yaml.tmp: Read-only file system Starting standalonesession as a console application on host flink-jobmanager-66fb98869d-w7plb. SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Sep 28, 2020 7:11:14 AM org.apache.hadoop.util.NativeCodeLoader <clinit> WARNING: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable [1]:https://ci.apache.org/projects/flink/flink-docs-release-1.11/ops/deployment/kubernetes.html#session-cluster-resource-definitions