15 Kubernetes: A primer
In the beginning, there were containers. But for all the benefits that Docker brought, there were still a few gaps when it came to production. You had to provision machines, then install the OS and the Docker Engine yourself. You had to set up secure access to Docker on those machines. And most importantly, there was no high availability or scale—if you wanted multiple containers serving your app, spread across a fleet of machines, there was (and is) no way to do that with Docker or Compose. A new technology emerged to fill those gaps—the container orchestrator—a platform which manages containers for you. With an orchestrator, you model your application like you do with Compose, and then you send the model to the orchestrator and it takes responsibility. It assigns containers to machines, organizes networking and storage, and keeps your application running. If a container exits or the machine hosting it goes offline, the orchestrator replaces it with a new container.
In this chapter you'll have a rapid introduction to Kubernetes, the world's favorite container orchestrator. You'll learn how to model, deploy and manage applications with a local Kubernetes environment, using the same sample apps you're familiar with from other chapters. There's a huge amount to learn with Kubernetes, but this chapter will give you the basics and the confidence to explore further.