个人需求是将 nfs 挂在到容器中使用,通过 yaml 配置的创建的 nginx pod 可以正常运行,于是将 nginx 的配置文件镜像改成了 centos,然后在运行的时候发生了 CrashLoopBackOff 状态,没有 logs 打印,yaml 配置如下
[[email protected] kubermange]# cat 002.yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: ct7
spec:
replicas: 2
selector:
app: web01
template:
metadata:
name: nginx
labels:
app: web01
spec:
containers:
- name: ct
image: docker.io/centos
ports:
- containerPort: 22
volumeMounts:
- mountPath: /mnt
readOnly: false
name: nginx-data
volumes:
- name: nginx-data
nfs:
server: 10.10.8.53
path: "/opt/xxx"
kubectl describe 看到的错误如下,还望各位大佬指导下哪里的问题,对 yaml 语法还不太了解,不清楚是不是语法有问题
Events: