When we use a YAML file to deploy pods, we could tell the deployment the number of pods needed in the "replicas" field:


We create our deployment using the command line:


Then we could scale the number of the pods up or down using the "kubectl scale" command.

In the below example, we scale our deployment up to "six" pods as below:


The downside is that, if we update our YAML file with a new version of our image for example, and we run the below command:


The number of replicas is going to go back to its initial value, which is "four" causing our application to have performance issues.


Brando Sabatini and Ikbal C ©. Powered by Blogger.