After executing the command to create and start worker pod with yaml file; pod status showing CrashLoopBackOff.
Please help to troubleshoot and solve this.
C:\Users\sskkube\Documents\Kube-practise\Demo-VotingApp>kubectl describe pod worker-app-pod
Name: worker-app-pod
Namespace: default
Priority: 0
Node: docker-desktop/192.168.65.4
Start Time: Thu, 03 Feb 2022 14:14:38 +0000
Labels: app=demo-voting-app
name=worker-app-pod
Annotations:
Status: Running
IP: 10.1.0.98
IPs:
IP: 10.1.0.98
Containers:
worker-app:
Container ID: docker://45ca34bbaf5130969fa2ab6ad8ea04987976a79f2ffbe74406876280c64d3712
Image: kodekloud/examplevotingapp_worker:v1
Image ID: docker-pullable://kodekloud/examplevotingapp_worker@sha256:741e3aaaa812af72ce0c7fc5889ba31c3f90c79e650c2cb31807fffc60622263
Port:
Host Port:
State: Terminated
Reason: Error
Exit Code: 1
Started: Thu, 03 Feb 2022 14:16:08 +0000
Finished: Thu, 03 Feb 2022 14:16:09 +0000
Last State: Terminated
Reason: Error
Exit Code: 1
Started: Thu, 03 Feb 2022 14:15:25 +0000
Finished: Thu, 03 Feb 2022 14:15:25 +0000
Ready: False
Restart Count: 4
Environment:
Mounts:
/var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-4lv8m (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
kube-api-access-4lv8m:
Type: Projected (a volume that contains injected data from multiple sources)
TokenExpirationSeconds: 3607
ConfigMapName: kube-root-ca.crt
ConfigMapOptional:
DownwardAPI: true
QoS Class: BestEffort
Node-Selectors:
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 97s default-scheduler Successfully assigned default/worker-app-pod to docker-desktop
Normal Pulled 7s (x5 over 95s) kubelet Container image “kodekloud/examplevotingapp_worker:v1” already present on machine
Normal Created 7s (x5 over 95s) kubelet Created container worker-app
Normal Started 7s (x5 over 94s) kubelet Started container worker-app
Warning BackOff 5s (x8 over 90s) kubelet Back-off restarting failed container