Hello @mmumshad Sir,
In kubernetes, after running the command " kubectl run nginx --image=nginx " the nginx pod is created and also nginx container also get created.
So how to see the container in docker environment ? because when running docker container ls, unable to see the nginx container there .
Thanks,
Sujal
Ayman
February 15, 2022, 1:55pm
#2
@sujal.kumar.mitra
Try to run the command docker container ls on the node which the pod is scheduled on it.
@mmumshad Sir, Thanks,
As checked after running the docker run nginx --image=nginx command,
The below two container is showing after running docker container ls. Why two container is showing ?
Please let me know,
Thanks,
Sujal
Hello, @sujal.kumar.mitra
You are running the wrong command. Correct command is docker run --name nginx nginx
Please see more details from the official docs.
docker run | Docker Docs
1 Like
Yes @Tej_Singh_Rana Sir, Now I realized. I ran it as Kubernetes format.
Thanks for the help !!
Are you working on k8s cluster?
Hello @Tej_Singh_Rana ,
Yes running on k8s cluster.
Ayman
February 19, 2022, 10:26pm
#9
pause is a helper container created by k8s to help the check the lifecycle for nginx container.