$ k apply -f nginx-pod-resources.yaml pod/nginx-pod-resources created
$ k get po -owide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-pod-resources 0/1 Pending 0 17s <none> <none> <none> <none>
$ k describe po nginx-pod-resources Name: nginx-pod-resources Namespace: default Priority: 0 Node: <none> Labels: <none> Annotations: <none> Status: Pending IP: IPs: <none> Containers: nginx: Image: nginx:alpine Port: <none> Host Port: <none> Limits: cpu: 20 memory: 200Mi Requests: cpu: 10 memory: 100Mi Environment: <none> Mounts: /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-j8clh (ro) Conditions: Type Status PodScheduled False Volumes: kube-api-access-j8clh: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: <nil> DownwardAPI: true QoS Class: Burstable Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Warning FailedScheduling 50s default-scheduler 0/2 nodes are available: 1 Insufficient cpu, 1 node(s) had taint {node-role.kubernetes.io/master: }, that the pod didn't tolerate.
$ k apply -f nginx-probe-cm.yaml -f nginx-pod-probe.yaml configmap/nginx-conf created pod/nginx-pod-probe created
$ k get po -owide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-pod-probe 1/1 Running 0 21s 10.10.1.108 mac-worker <none> <none>
$ k apply -f nginx-probe-cm.yaml -f nginx-pod-probe.yaml configmap/nginx-conf created pod/nginx-pod-probe created
$ k get po -owide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES nginx-pod-probe 0/1 CrashLoopBackOff 2 (16s ago) 28s 10.10.1.109 mac-worker <none> <none>
$ k describe po nginx-pod-probe Name: nginx-pod-probe Namespace: default Priority: 0 Node: mac-worker/192.168.191.146 Start Time: Wed, 28 Jun 2022 15:12:27 +0000 Labels: <none> Annotations: <none> Status: Running IP: 10.10.1.109 IPs: IP: 10.10.1.109 Containers: nginx: Container ID: docker://fcd440ac3a08810df51f12e2ddb0bad4a40922bdb3f9a6d94009c2404dcc7a13 Image: nginx:alpine Image ID: docker-pullable://nginx@sha256:2d194184b067db3598771b4cf326cfe6ad5051937ba1132b8b7d4b0184e0d0a6 Port: 80/TCP Host Port: 0/TCP State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: Completed Exit Code: 0 Started: Wed, 28 Jun 2022 15:13:56 +0000 Finished: Wed, 28 Jun 2022 15:14:00 +0000 Ready: False Restart Count: 5 Liveness: tcp-socket :80 delay=0s timeout=1s period=10s #success=1 #failure=3 Readiness: http-get http://:80/ready delay=0s timeout=1s period=5s #success=1 #failure=3 Startup: exec [cat /var/run/nginx.pidx] delay=0s timeout=1s period=1s #success=1 #failure=3 Environment: <none> Mounts: /etc/nginx/conf.d from nginx-conf-vol (rw) /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-n957g (ro) Conditions: Type Status Initialized True Ready False ContainersReady False PodScheduled True Volumes: nginx-conf-vol: Type: ConfigMap (a volume populated by a ConfigMap) Name: nginx-conf Optional: false kube-api-access-n957g: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: <nil> DownwardAPI: true QoS Class: BestEffort Node-Selectors: <none> Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 99s default-scheduler Successfully assigned default/nginx-pod-probe to mac-worker Normal Pulled 92s (x3 over 99s) kubelet Container image "nginx:alpine" already present on machine Normal Created 92s (x3 over 99s) kubelet Created container nginx Normal Started 92s (x3 over 99s) kubelet Started container nginx Warning Unhealthy 89s (x9 over 99s) kubelet Startup probe failed: cat: can't open '/var/run/nginx.pidx': No such file or directory Normal Killing 88s (x3 over 96s) kubelet Container nginx failed startup probe, will be restarted Warning BackOff 80s (x4 over 88s) kubelet Back-off restarting failed container