Skip to main content

Command Palette

Search for a command to run...

Execute Rolling Updates in Kubernetes

Step-by-Step Guide to Rolling Updates in Kubernetes

Updated
1 min read
Execute Rolling Updates in Kubernetes
A

Infosec Poet and CAP-certified DevOps/SecOps Engineer, passionate about security, creativity, and continuous learning.

Tasks

  • Execute a rolling update for the application using the nginx:1.17 image.

  • Ensure the deployment is named nginx-deployment.

  • Verify that all pods are operational after the update.

Steps

  1. Get the description of deployment named nginx-deployement

     kubectl describe deployment nginx-deployment
    

    We can see there is image: nginx:1.16

  2. Lets update nginx container

     kubectl set image deployment/nginx-deployment nginx-container=nginx:1.17
    

  3. Check the Rollout Status.

     kubectl rollout status deployment/nginx-deployment
    
  4. Again check the update

     kubectl describe deployment nginx-deployment
    

    We can see we have image, nginx:1.17 now.

  5. Out of the box.

    • Check our nginx is running on web or not.

    • Not check the nginx version making 404 error :p

      #nginx #k8s #kubernetes #happylearning

DevOps

Part 5 of 10

In this series, I will cover various DevOps practices, tools, CI/CD pipelines, infrastructure as code, automation tips, and troubleshooting techniques.

Up next

Set Resource Limits in Kubernetes Pods

How to Define Resource Restrictions for Kubernetes Pods