We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Deployment and Pod Review

You've already deployed a website's server code and listed its pods! Let's slow down for a second and talk about what actually happened.

Deployments

This command:

kubectl create deployment synergychat-web --image=bootdotdev/synergychat-web:latest

created a new "Deployment", and we had to tell it two things:

  1. The name of the deployment, in our case, synergychat-web

  2. The ID of the Docker image we want to deploy, in our case, bootdotdev/synergychat-web:latest

We're describing our desired state in a Deployment, and it's the Deployment Controller's job to make the current state match the desired state. So, in the command above we're just saying:

"Mr. Kubernetes, please make sure that the bootdotdev/synergychat-web:latest image is running in the cluster, and if it isn't, please get it going."

Pods

A Pod is the simplest unit in the Kubernetes object model that you create or deploy. It represents one (or sometimes more) running containers in a cluster. In a simple web application, you might have one single pod: the web server. As traffic grows, you might deploy that same code to multiple pods to handle the increased load. In a more complex backend system, you might have 3 pods for the web server and 2 pods that handle background video processing.

Pods are just wrappers around containers, they're basically a Docker container with a little extra Kubernetes magic. The container is the actual application, and the Pod is the Kubernetes abstraction that manages the container and the resources it needs to run. To oversimplify: a pod is a running application.

So when you created the synergychat-web deployment, Kubernetes noticed that no pods were running your image, and started one to match your desired state. That's the pod you saw with kubectl get pods.

Assignment

Answer the question.