Creting a deployment:

Deployments handle replicasets and replicasets deal with pods:


We create a deployment using the below command:


The command creates the deployment called "deployment_1" and writes the Yaml configuration file to the "deployment_1.yaml" file.

Creating the deployment manually:

We could also write the Yaml configuration file for our deployment manually as below:


Then we create our deployment using the below command:


We can check our deployment using the below command:


We can also see our pods using the below command:


Changing the image version:

We can change the version of the deployed "nginx" image in the Yaml file:


The "version" could be "1.18" or "1.19" for example in the case of an "nginx" image.

Then we can check the status of our deployment using the below command:


To see the history of the versions deployed, we could use the below command:



To cancel the rollout and get back to the previous version, we use:


Scaling our application:

We can scale our three "nginx" pods up to fifty pods using the below command:


Brando Sabatini and Ikbal C ©. Powered by Blogger.