What is the reason for this error? I dont understand . Command runs two pods but not running ubuntu pod?
vagrant@vagrant:~$ kubectl get po NAME READY STATUS RESTARTS AGE cassandra-2p4m0 0/1 Running 1 1d k8s-master-127.0.0.1 3/3 Running 6 1d nginx-app-6q4cn 1/1 Running 0 1h nginx-i3bja 1/1 Running 4 1d ubuntu-app-nuuyh 0/1 Running 11 1h vagrant@vagrant:~$ kubectl exec -ti cassandra-2p4m0 -- /bin/sh
bin dev kubernetes-cassandra.jar media proc run.sh srv usr boot etc lib mnt root sbin sys var cassandra_data home lib64 opt run selinux tmp
vagrant@vagrant:~$ kubectl exec -ti nginx-i3bja -- /bin/sh
bin dev home lib64 mnt proc run srv tmp var boot etc lib media opt root sbin sys usr
vagrant@vagrant:~$ kubectl exec -ti ubuntu-app-nuuyh -- /bin/sh error: Error executing remote command: Error executing command in container: container not found ("ubuntu-app")
The answer is already in the comments. The 11 restarts in the "get pods" output indicates that your container is repeatedly crashing. You can't exec into a dead container.
Look at the logs using "kubectl logs --previous ubuntu-app-nuuyh" to determine why if "kubectl get pod -o yaml ubuntu-app-nuuyh" doesn't provide enough information.