Running a web application in Kubernetes
Kubernetes introduces a few new terms, the first of these is a pod. Pods are the way to run a container in Kubernetes. When we ask Kubernetes to run a pod, we specify some details, such as the image we want it to run. Orchestrators such as Kubernetes are designed to enable us to run multiple components as part of a system, including being able to scale out the number of instances of components. To help serve this goal, Kubernetes adds another concept called deployments. Deployments are built on pods and allow us to specify how many instances of the corresponding pod we want Kubernetes to run, and this value can be changed dynamically, enabling us to scale out (and in) our application.
We'll take a look at creating a deployment in a moment, but first, we need to create a new tag for our sample application. When we built the Docker image previously, we used the simple-python-app
tag. Each tag has one or more associated versions and since...