If you encounter 0 up-to-date pods but there’s 1 available, it means the available pod is using an old spec; the new changes haven’t propated to the pod, that’s why it says there’s no up-to-date pods. Check the deployment events and pod logs.
kubectl get deploy my-deploy
NAME READY UP-TO-DATE AVAILABLE AGE
my-deploy 1/1 0 1 5m
If logs and events didn’t help, check the deployment. Below, you will notice that there’s DeploymentPaused and there’s no new replicaset. The available pod is associated to the old replicaset. A new replicaset will only be created once the deployment is resumed.
Replicas: 1 desired | 0 updated | 1 total | 1 available | 0 unavailable
...
Conditions:
Type Status Reason
---- ------ ------
Available True MinimumReplicasAvailable
Progressing Unknown DeploymentPaused
OldReplicaSets: black-cka25-trb-7bdc648c8c (1/1 replicas created)
NewReplicaSet: <none>
To resume the deployment:
kubectl rollout resume deployment my-deploy