From the course: Certified Kubernetes Application Developer (CKAD) Cert Prep

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Deployment scalability

Deployment scalability

- Let's talk about deployment scalability. So deployments are using ReplicaSet, and ReplicaSet is a separate API resource, to manage the expected number of application instances. When the application is started using kubectl create deploy with the argument --replicas=3, the ReplicaSet ensures that the desired number of instances is running. And to manually manage application scalability, you can use the kubectl scale command at any moment. Let me show you. So let's use kubectl create deploy scaledapp - -image=nginx --replicas=3. kubectl get all --selector app=scaledapp. And what do we see? Well, we see the deployment. The deployment is expecting three pods to be available, and we can see 3/3 are available. Deployment has created a ReplicaSet, and, while doing so, it has appended a suffix to uniquely identify the ReplicaSet, and the ReplicaSet has taken care of the different pods. So what would happen if you use kubectl delete pod scaledapp, and we just pick any of these pods? Well…

Contents