Chapter 1 of Docker Essentials covers this in depth. Here is the part Kubernetes needs.
Image and container
An image is a frozen copy of a program with everything it needs to run: its files, its libraries, and the command that starts it. An image never changes.
A container is an image that is running. It is a normal process on a computer, with its own view of the filesystem and the network. Start the same image three times and you get three containers.
Image names
Images live in a registry, a store that computers download from. You name an image with a repository and a tag:
| You write | Kubernetes pulls |
|---|---|
nginx:1.27 | Version 1.27 of nginx |
nginx | The tag latest, whatever that is today |
nginx:1.99-nope | Nothing. The tag does not exist, so the container never starts |
Downloading an image is called pulling. A tag that does not exist cannot be pulled. You will see that error in the lab, and many times after.
What Kubernetes adds
One computer can run a few containers. Kubernetes runs them on many computers, restarts the ones that stop, and keeps the number you asked for. The rest of this course is how you ask.