我在资源日志中,发现这样一条
create Pod redis-cluster-0 in StatefulSet redis-cluster failed error: Pod “redis-cluster-0” is invalid: spec.containers: Required value
查看yaml发现:
initContainers:
- name: container-hi37u2
image: redis
command:
- redis-server
args:
- /etc/redis/redis.conf
ports:
- name: tcp-6379
containerPort: 6379
protocol: TCP
resources:
limits:
cpu: '1'
memory: 1Gi
volumeMounts:
- name: host-time
mountPath: /etc/localtime
- name: volume-41w995
mountPath: /etc/redis/
- name: redis-cluster
mountPath: /redis
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
containers: null
我确定我在镜像设置时,选择的是工作镜像,但是创建完变成了init镜像???????这是什么鬼