Kubernetes quick notes deployment (WIP)

As opposed to docker that operates on the container level directly, kubernetes has a different approach as such there are a set of steps required to get the application running into the cluster. For example, in docker a simple docker run creates the container and starts it. In kubernetes, first we need to create a deployment and then expose it.

Creating a deployment

kubectl create deployment my-deployment-name --image=my-image

Exposing the deployment

kubectl expose deployment my-deployment-name

Managing containers

Therefore, it is possible to use kubernetes with the same docker behavior, for example the kubectl run command is available for that. The attention point is the need to have a pod. In other words, in docker you can run a container with docker run, but in kubeternets you need a pod before that. The analogy that [1] uses for describing how kubernetes handles the different layersof abstraction is as follows:

  • A Deployment manages a ReplicaSet
  • A ReplicaSet manages a Pod
  • A Pod is an abstraction of a Container


  1. [1]Nana, “Kubernetes Tutorial for Beginners [FULL COURSE in 4 Hours],” 2021 [Online]. Available at: https://www.youtube.com/watch?v=X48VuDVv0do. [Accessed: 06-Nov-2020]