Getting started with Kubernetes and container orchestration
You've started to "containerize" your applications by writing a Dockerfile or two, and now you want to run your containers in a cluster. But Kubernetes is quite different from Docker: the smallest unit of deployment is not a container, but a pod; pods are accessed through specialized load balancers called services; there are labels and selectors everywhere; and everything is created by expressing desired state with YAML, lots of YAML.
In this hands-on workshop, we will learn about Kubernetes and its key concepts, both in theory (we will become familiar with all the things evoked in the previous paragraph) and in practice (we will know how to use them to deploy and scale our applications).
Kubernetes has the reputation of being a complex system with a steep learning curve. We will see that it is, indeed, a complex system, but that it is possible to tame its most essential features in just a few hours.
We will:
- see what a containerized application looks like,
- learn about Kubernetes concepts, architecture, and network model,
- interact with a Kubernetes cluster with the kubectl CLI,
- create deployments, pods, services, daemon sets, and more,
- implement high availability and load balancing for our services,
- export and import YAML description of Kubernetes resources,
- deploy new releases of our application without downtime,
- isolate workloads with namespaces and network policies,
- manage authentication and authorization with role-based access control,
- ... and some more!
This tutorial is for developers, system administrators, and architects alike: anyone who needs to interact with a Kubernetes cluster, or who wants to understand practical Kubernetes concepts in order to design scalable applications.
To make the most out of this tutorial, you should be comfortable with the UNIX command line (be able to SSH into a remote machine, navigate directories, edit files with vi
or a similar editor), and have basic knowledge of containers. It's not necessary to be a Docker expert, but ideally, you'll have already built and run a container image (for instance with docker build
and docker run
).
You do not need to install Kubernetes on your local machine: we will execute all the exercises on remote Kubernetes clusters, provided for the duration of the tutorial.