There is an existing Deployment named api-new-c32 in Namespace neptune. A developer did make an update to the Deployment but the updated version never came online. Check the Deployment history and find a revision that works, then rollback to it. Could you tell Team Neptune what the error was so it doesn't happen again?
k -n neptune get deploy # overview
k -n neptune rollout -h
k -n neptune rollout history -h
➜ k -n neptune rollout history deploy api-new-c32
deployment.extensions/api-new-c32
REVISION CHANGE-CAUSE
1 <none>
2 kubectl edit deployment api-new-c32 --namespace=neptune
3 kubectl edit deployment api-new-c32 --namespace=neptune
4 kubectl edit deployment api-new-c32 --namespace=neptune
5 kubectl edit deployment api-new-c32 --namespace=neptune
There are 5 revisions, let's check Pod and Deployment status:
➜ k -n neptune get deploy,pod | grep api-new-c32
deployment.extensions/api-new-c32 3/3 1 3 141m
pod/api-new-c32-65d998785d-jtmqq 1/1 Running 0 141m
pod/api-new-c32-686d6f6b65-mj2fp 1/1 Running 0 141m
pod/api-new-c32-6dd45bdb68-2p462 1/1 Running 0 141m
pod/api-new-c32-7d64747c87-zh648 0/1 ImagePullBackOff 0 141m
➜ k -n neptune describe pod api-new-c32-7d64747c87-zh648 | grep -i error
... Error: ImagePullBackOff
➜ k -n neptune describe pod api-new-c32-7d64747c87-zh648 | grep -i image
Image: ngnix:1.16.3
Image ID:
Reason: ImagePullBackOff
Warning Failed 4m28s (x616 over 144m) kubelet, gke-s3ef67020-28c5-45f7--default-pool-248abd4f-s010 Error: ImagePullBackOff
Someone seems to have added a new image with a spelling mistake in the name ngnix:1.16.3, that's the reason we can tell Team Neptune!
k -n neptune rollout undo deploy api-new-c32
Does this one work?
➜ k -n neptune get deploy api-new-c32
NAME READY UP-TO-DATE AVAILABLE AGE
api-new-c32 3/3 3 3 146m
Yes! All up-to-date and available.
Also a fast way to get an overview of the ReplicaSets of a Deployment and their images could be done with:
k -n neptune get rs -o wide | grep api-new-c32