Kubernetes Handbook
  • Introduction
  • Prerequisites
    • What is Containerization
    • What is Docker
    • Difference between Docker and VM
  • Features of Kubernetes
    • What is Kubernetes
    • Features of Kubernetes - 1
    • Features of Kubernetes - 2
    • Which Tool to Use for Orchestration
  • Architecture
    • Master Node
    • etcd and kubectl
    • Worker Nodes
  • Pods and Nodes
    • Nodes
    • Pods
  • Controllers
    • Benefits of Controllers
    • Kinds of Controllers
  • Minikube
    • What is Minikube
  • Installation and Running (Mac OS)
    • Installation
    • Running Hello World Application
  • Labels Namespaces and Selectors
    • Labels
    • Namespaces
    • Selectors
  • Health Checks Rollouts and Rollbacks
    • Health Checks
    • Rollouts and Rollbacks
  • Config Maps and Secrets
    • Config Maps
    • Secrets
  • Running Jobs
    • How to Run Jobs
  • Dashboard and Debugging
    • Kubernetes Dashboard
    • Debugging
Powered by GitBook
On this page
  • Rollouts
  • Rollbacks

Was this helpful?

  1. Health Checks Rollouts and Rollbacks

Rollouts and Rollbacks

PreviousHealth ChecksNextConfig Maps

Last updated 3 years ago

Was this helpful?

Upgradation or rollback to a particular version is possible with running deployments.

Use this example file to understand the commands associated with rollouts and rollbacks.

Rollouts

$ kubectl create -f helloworld-black.yaml --record==true
$ minikube service navbar-service
$ kubectl set image deployment/navbar-deployment helloworld=karthequian/helloworld:blue

Set an updated docker image for rollout

$ kubectl rollout history deployments/navbar-deployment 

Check the rollouts image change/version history

Rollbacks

$ kubectl rollout undo deployment/navbar-deployment
$ kubectl rollout undo deployment/navbar-deployment —to-revision=<number>

Rollback to a particular revision.

775B
helloworld-black.yaml