12 Under the hood of Kubernetes

 

This chapter covers

  • Understanding how Kubernetes components work together under the hood
  • Debugging Kubernetes and understanding how the components break
  • Designing chaos experiments to make your Kubernetes clusters more reliable

Finally, in this third and final chapter on Kubernetes, we dive deep under the hood and see how Kubernetes really works. If I do my job well, by the end of this chapter you’ll have a solid understanding of the components that make up a Kubernetes cluster, how they work together, and what their fragile points might be. It’s the most advanced of the triptych, but I promise it will also be the most satisfying. Take a deep breath, and let’s get straight into the thick of it. Time for an anatomy lesson.

12.1 Anatomy of a Kubernetes cluster and how to break it

As I’m writing, Kubernetes is one of the hottest technologies out there. And it’s for a good reason; it solves a lot of problems that come from running a large number of applications on large clusters. But like everything else in life, it comes with costs.

One of them is the complexity of the underlying workings of Kubernetes. And although this can be somewhat alleviated by using managed Kubernetes clusters so that most day-to-day management of Kubernetes is someone else’s problem, you’re never fully insulated from the consequences. And perhaps you’re reading this on your way to a job managing Kubernetes clusters, which is yet another reason to understand how things work.

12.1.1  Control plane

12.1.2  Kubelet and pause container

12.1.3  Kubernetes, Docker, and container runtimes

12.1.4  Kubernetes networking

12.2 Summary of key components

Summary