Does deployment create pods on different containers or same container?

When we run deployment with say 6 replicas, is each pod is created on different containers or the same container (1 container)?

Because in the start of the course( Kubernetes for the Absolute Beginners - Hands-on), Mumshad has said we can run only one pod in 1 container, we cannot run another pod of same type(functionality) in one container, but we can run different type(functionality) of pod can be run on the 1 container. But when it comes to deployment, does it create the same type of pods in the one container? And is that allowed because of Deployment?
This isn’t clear.
Can somebody please clarify?

Cheers

Maybe you should go back to the earlier material. A pod isn’t created on a container, but a container runs within a pod. A pod can even contain more than one container.

So for a deployment, one or more pods will be created. And since containers run inside of pods, there will be different container instances running for every pod that is created by the deployment.

Thanks for that eye opener, I have revisited the videos again. My understanding with words was wrong, it is bit more clear now.

Cheers

1 Like