You are signed in. Close

You are signed out. Close

Thank you. Your subscription has started. Close

Thank you. You will get an email when a new comic comes out. Close

We could not confirm your payment. If you paid, use the link "Sign in" at the bottom of the page. Close

Something went wrong on our side. Please try again in a moment. Close

Previous episode Kubernetes manifest: you write what you want, never how

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. 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.you3 containers,right?cafe-menu.yamlkind: Deploymentreplicas: 3image: cafe-menu:1.0

    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. 2 The difference matters. Kubernetes never runs a container on its own: it always puts it inside something first.KubernetesNo containergoes out alone.your container?

    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

Next episode kubectl apply: how your file reaches a Kubernetes cluster

Share this comic

More comics