> For the complete documentation index, see [llms.txt](https://amdocs-1.gitbook.io/kubernetes-handbook/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amdocs-1.gitbook.io/kubernetes-handbook/health-checks-rollouts-and-rollbacks/rollouts-and-rollbacks.md).

# Rollouts and Rollbacks

**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.&#x20;

{% file src="/files/-Mg0Vx3M6Y4QcvWpjhnd" %}

## Rollouts

```
$ kubectl create -f helloworld-black.yaml --record==true
```

```
$ minikube service navbar-service
```

```
$ kubectl set image deployment/navbar-deployment helloworld=karthequian/helloworld:blue
```

{% hint style="info" %}
Set an updated docker image for rollout
{% endhint %}

```
$ kubectl rollout history deployments/navbar-deployment 
```

{% hint style="info" %}
Check the rollouts image change/version history
{% endhint %}

## Rollbacks

```
$ kubectl rollout undo deployment/navbar-deployment
```

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

{% hint style="info" %}
Rollback to a particular revision.
{% endhint %}
