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 Pods and Deployments: why you never ask Kubernetes for a container

What happens when you run kubectl apply

kubectl apply: how your file reaches a Kubernetes cluster

You type kubectl apply and press Enter. A moment later, a cluster you cannot see knows what you want. In that moment, your YAML file made a trip. It carried your wish, and it also carried proof of who you are.

  1. 1 You type one line and press Enter: kubectl apply -f cafe-menu.yaml. In plain words: apply this file to my cluster.youkubectl apply -f cafe-menu.yaml

    You type one line and press Enter: kubectl apply -f cafe-menu.yaml. In plain words: apply this file to my cluster.

  2. 2 The first word wakes up kubectl, a program on your laptop that talks to clusters for you. Two questions stop it at once.kubectlcafe-menu.yamlWhich cluster?And who isasking?

    The first word wakes up kubectl, a program on your laptop that talks to clusters for you. Two questions stop it at once.

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 The Kubernetes API server: the one door of the control plane

Share this comic

More comics