My kubernetes pods keep crashing with “CrashLoopBackOff” but I can't find any log

前端 未结 15 1832
耶瑟儿~
耶瑟儿~ 2020-11-29 22:40

This is what I keep getting:

[root@centos-master ~]# kubectl get pods
NAME               READY     STATUS             RESTARTS   AGE
nfs-server-h6nw8   1/1           


        
15条回答
  •  盖世英雄少女心
    2020-11-29 23:30

    I observed the same issue, and added the command and args block in yaml file. I am copying sample of my yaml file for reference

     apiVersion: v1
        kind: Pod
        metadata:
          labels:
            run: ubuntu
          name: ubuntu
          namespace: default
        spec:
          containers:
          - image: gcr.io/ow/hellokubernetes/ubuntu
            imagePullPolicy: Never
            name: ubuntu
            resources:
              requests:
                cpu: 100m
            command: ["/bin/sh"]
            args: ["-c", "while true; do echo hello; sleep 10;done"]
          dnsPolicy: ClusterFirst
          enableServiceLinks: true
    

提交回复
热议问题