Home Explore Blog CI



kubernetes

5th chunk of `content/en/blog/_posts/2016-04-00-Using-Deployment-Objects-With.md`
30ed07cca9a60247666284ec7f21049c1f97bc94ab3b36d2000000010000048b
](https://2.bp.blogspot.com/-x4FmFXdzw30/Vv7KAAQ21wI/AAAAAAAAChM/QWv8Y03lIsU4JBqjE3XFQU2EtzZgogylA/s1600/deployment-API-3.png)

After a while, you’ll find the update seems stuck. What happened?  

### Debugging your rollout
If you look closer, you’ll find that the pods with the new “kitty” tagged image stays pending. The Deployment automatically stops the rollout if it’s failing. Let’s look at one of the new pod to see what happened:  
```  
$ kubectl describe pod/update-demo-1326485872-a4key  
```  
 Looking at the events of this pod, you’ll notice that Kubernetes failed to pull the image because the “kitty” tag wasn’t found:  

Failed to pull image "gcr.io/google\_containers/update-demo:kitty": Tag kitty not found in repository gcr.io/google\_containers/update-demo  

### Rolling back
Ok, now we want to undo the changes and then take our time to figure out which image tag we should use.  
```  
$ kubectl rollout undo deployment/update-demo   
deployment "update-demo" rolled back  
```  


[

Title: Debugging a Failed Rollout and Rolling Back
Summary
The content explains how to debug a failed rollout in Kubernetes. It identifies that the new pods are stuck in a pending state. By describing one of the new pods, it's revealed that Kubernetes failed to pull the image because the 'kitty' tag was not found. It then demonstrates how to rollback the deployment to the previous working state using the kubectl rollout undo command.