In the previous chapter, we learned how SwarmKit uses rolling updates to achieve zero downtime deployments. We were also introduced to Docker secrets, which are used to share confidential data with an application service running in a Docker Swarm.
In this chapter, we're going to introduce Kubernetes. Kubernetes is currently the clear leader in the container orchestration space. We are starting with a high-level overview of the architecture of a Kubernetes cluster and then we will discuss the main objects used in Kubernetes to define and run containerized applications.
The topics discussed in this chapter are:
- Architecture
- Kubernetes masters
- Cluster nodes
- Introduction to MiniKube
- Kubernetes support in Docker for Mac and Docker for Windows
- Pods
- Kubernetes ReplicaSet
- Kubernetes deployment
- Kubernetes service
- Context-based routing
- Comparing SwarmKit with Kubernetes
After finishing this chapter, you will be able to:
- Draft the high-level architecture of a Kubernetes cluster on a napkin
- Explain three to four main characteristics of a Kubernetes pod
- Describe the role of Kubernetes ReplicaSets in two to three short sentences
- Explain the two to three main responsibilities of a Kubernetes service
- Create a pod in Minikube
- Configure Docker for Mac or Windows to use Kubernetes as orchestrator
- Create a deployment in Docker for Mac or Windows
- Create a Kubernetes service to expose an application service internally (or externally) to the cluster