下面是我在rancher页面配置flink的yaml:
apiVersion: batch/v1
kind: Job
metadata:
name: flink-jobmanager
namespace: flink-resource
spec:
template:
metadata:
labels:
app: flink
component: jobmanager
spec:
restartPolicy: OnFailure
containers:
- name: jobmanager
image: apache/flink:1.13.1
env:
args: [ "--job-classname", "com.ponshine.CorrelateEngine"]
ports:
- containerPort: 6123
name: rpc
- containerPort: 6124
name: blob-server
- containerPort: 8081
name: webui
livenessProbe:
tcpSocket:
port: 6123
initialDelaySeconds: 30
periodSeconds: 60
volumeMounts:
- name: flink-config-volume
mountPath: /opt/flink/conf
- name: job-artifacts-volume
mountPath: /opt/flink/usrlib
#securityContext:
# runAsUser: 9999 # 参考官方 flink 镜像中的 flink 用户,如有必要可以修改
volumes:
- name: flink-config-volume
configMap:
name: flink-config
items:
- key: config.yaml
path: config.yaml
- key: log4j-console.properties
path: log4j-console.properties
- name: job-artifacts-volume
persistentVolumeClaim:
claimName: hostpath-pvc
以下为报错内容
我特地单独docker起了一个flink容器,所有目录都是存在的,不知道为什么rancher启动flink一直提示目录不存在,按照文心一言和通义千问的解决办法也都试过,都没有解决这个问题。来个大神麻烦解答一下
标签:name,flink,containerPort,volume,yaml,rancher2.5,config,求教,flink1.13 From: https://www.cnblogs.com/24xiaomanba/p/18344040