Kubernetes Pod vs Container
People think a pod is just the Kubernetes word for a container, and it is not. A pod is a wrapper around one container or a few. The containers in one pod share an address and start and stop together. Kubernetes places and replaces pods, never loose containers. Most pods hold one container, which is why the two get mixed up.
Kubernetes Pod
The smallest thing Kubernetes runs. It wraps one container, or a few that work as one.
A Kubernetes pod is the smallest thing Kubernetes runs. It wraps one container, or a few that must work side by side. The containers in a pod share one network address and can share storage. Pods are throwaway. When one dies, a new one with a new address takes its place. That is why you rarely make a pod by hand.
Container
A sealed box that holds an app and all it needs. It runs the same anywhere.
A container is a sealed box for one app. It holds the app's code and every file the app needs to run. Because it brings its own files, it runs the same on a laptop and on a server. Many containers can share one machine, and each stays in its own space. They are lighter than a virtual machine, because they share the machine's core system, the kernel.
In one line
- Kubernetes Pod
- The smallest thing Kubernetes runs. It wraps one container, or a few that work as one.
- Container
- A sealed box that holds an app and all it needs. It runs the same anywhere.