What happens when you run kubectl apply
Pods and Deployments: why you never ask Kubernetes for a container
Kubernetes runs containers. So you would think that you ask it for containers. But every Kubernetes file asks for something else. The important word in the file is not "container".
-
1
Before your line sends the file anywhere, look at its first line. You did not ask for 3 containers: you asked for a Deployment of 3 replicas.
-
2
The difference matters. Kubernetes never runs a container on its own: it always puts it inside something first.
The rest of this episode is for subscribers
Subscribe to read every premium episode. You can cancel when you want.
Paid yearly: $99 instead of $119.88