kubernetes: Updating image tag for a stateful set does not upate the pods.
What happened:
I updated the image tag for a stateful set. I tried three different ways kubectl apply -f statefulset.yml, kubectl edit statefulset myapp and kubectl patch statefulset myapp --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"registry.gitlab.com/myaccount/myrepo/myapp:1.0.2"}]'
What you expected to happen:
I expected that when the image tag changed from 1.0.1 to 1.0.2 in my statefulset, that the pod would be updated to reflect that. Instead the pod and the statefulset showed different images.
How to reproduce it (as minimally and precisely as possible): Create a stateful set. Then update the image to something different. Anything else we need to know?: My pod was failing its readiness probe which is why I was trying to update it. I have set the update strat to rolling. Environment:
- Kubernetes version (use
kubectl version):
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:18:23Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
- Cloud provider or hardware configuration: DOKS (Digital Ocean Kubernetes)
- OS (e.g:
cat /etc/os-release): Ubuntu I think - Kernel (e.g.
uname -a): - Install tools:
- Network plugin and version (if this is a network-related bug):
- Others:
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 3
- Comments: 16 (4 by maintainers)
Seen this in several forms. If the pod is in a not ready state and you update the stateful set, nothing happens.
/assign @tnozicka /triage accepted