0

when ever i run # kubectl run ubuntu --image=ubuntu or centos i gt containercrashoff , when checked in kubectl describe pod below error is observed

Warning Failed 4s (x3 over 22s) kubelet Error: failed to create containerd task: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "ping": executable file not found in $PATH: unknown

pl suggest to solve this issue

  • Both of those pods start an interactive shell by default (which exists immediately because it's not attached to a tty). That doesn't make sense for what you're doing. Decide what persistent process you're going to run in those containers and add it as parameters to the `kubectl run` command. E.g., `kubectl run ubuntu --image=ubuntu sleep -- sleep inf` – larsks Feb 27 '22 at 13:48
  • i am new to kubernetes and i was practicing some basic scenerios which were working earlier but now every container is crashing with the same commands, i have tried the command provided by you but its failing again # kubectl run ubuntu --image=ubuntu sleep -- sleep inf pod/ubuntu created # kubectl get pod NAME READY STATUS RESTARTS AGE ubuntu 0/1 CrashLoopBackOff 1 11 – user18323332 Feb 27 '22 at 15:39
  • Have you looked at the pod logs or events to see if there are any clues about why it's failing? – larsks Feb 27 '22 at 15:50
  • event output Successfully pulled image "ubuntu" in 2.878713602s Successfully pulled image "ubuntu" in 2.926146159s Pulling image "ubuntu" Created container ubuntu2 Started container ubuntu2 Successfully pulled image "ubuntu" in 2.796668146s Back-off restarting failed container the containter is succesfully created then get terminated – user18323332 Feb 27 '22 at 16:09

0 Answers0