Category: Kubernetes, Docker, yaml

Well, I’ve written about Kubernetes (K8S) in brief, but now it’s time to get a little more into the concepts of what it can do. All three are a YAML definition to request a certain number of pods (the name given to the object running the container) and manage them, all 3 use a ReplicaSet to manage this which i’ll expand on later on, for the moment lets talk about the differences between them and the situations you would use them in. Firstly the Deployment, the most basic of the three, this is the simplest form of getting something out onto the cluster, this will create however many pods of a thing you want, picking whatever nodes are available, if you roll out a new version, all the pods are terminated and new pods are build to replace them, if something bad happens in the pod, it’s killed, cleaned up and rebuilt, plain and simple.

if you add a node (Server / VPC) then this makes sure a copy of your deployment is running on it.

If I want to update that version, I change the version in the deployment to what I want, the deployment will then create a new ReplicaSet for the new version and that new ReplicaSet will start up new pods, meanwhile the deployment looks to the old ReplicaSet and starts shutting down the old pods, this way the user’s of you system will see no downtime as there was always at least one instance running of your application.

Related Articles