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

What happens when you run kubectl apply

Kubernetes: why one server is not enough to keep an app online

An app runs on one server. If the server stops, the app stops too. If it stops on a Sunday night, the website stays down until somebody wakes up. Kubernetes was built for this problem.

  1. 1 Take one small app: the menu page of a café.Any computer canstop one day. Sohow does an appstay online?

    Take one small app: the menu page of a café.

  2. 2 You built it for Rono, who runs the café. It lives on a server, a computer that stays on day and night.RonoOnline every day,Sunday too!youa server

    You built it for Rono, who runs the café. It lives on a server, a computer that stays on day and night.

  3. 3 One Sunday, the server stops, and your app with it. Miva, a regular, opens the menu on her phone and gets an error.SundayMivaNo menutoday?stopped

    One Sunday, the server stops, and your app with it. Miva, a regular, opens the menu on her phone and gets an error.

  4. 4 So you run 3 copies on 3 servers, and when one stops, the others keep the menu online. But someone must start a new copy, at any hour: you.stoppedyouAgain? At 3 inthe morning?

    So you run 3 copies on 3 servers, and when one stops, the others keep the menu online. But someone must start a new copy, at any hour: you.

  5. 5 Kubernetes is software made for that job. It runs on a group of servers, and you only say how many copies you want.you3 copiesof my appKubernetes3 copies.Starting!

    Kubernetes is software made for that job. It runs on a group of servers, and you only say how many copies you want.

  6. 6 When a server stops, Kubernetes sees 2 copies where you asked for 3 and starts a new one elsewhere. Nobody wakes you up.Kubernetes2 of 3? Onemore, then.stoppednew copy

    When a server stops, Kubernetes sees 2 copies where you asked for 3 and starts a new one elsewhere. Nobody wakes you up.

  7. 7 One thing is still open: your app never runs alone. It needs other software, and each server would need it too.Kubernetes3 copies of what,exactly????

    One thing is still open: your app never runs alone. It needs other software, and each server would need it too.

  8. Quick check

    Rono expects a big crowd this week.You change your wishfrom 3 copies to 5.No server stopped.What doesKubernetes do?

    Rono expects a big crowd this week.

    Show the answer

    It starts 2 more copies. Kubernetes keeps the number you ask for, whether a server stops or you change the number.

  9. Go further

    Where the name comes from, and a word for that Sunday.Kubernetes, K8sGreek for helmsman,the one who steersa ship. K8s is short:a K, 8 letters, an sdowntimethe time an appis offline, likethat Sunday

    Where the name comes from, and a word for that Sunday.

Next episode Image and container: what Kubernetes actually copies

Share this comic

More comics