In Docker, one entry describes the ports: -p 8080:80, the host port on the left and the container port on the right. A Kubernetes Service can have three ports, and each lives on its own level of the cluster. Beginners and interview candidates alike mix them up, so let's take them one at a time.
In this lesson
- A site on port 8080
- Three fields
- What about containerPort
- Compared with Docker
- Common mistake
- Key points