-
Notifications
You must be signed in to change notification settings - Fork 42.6k
Closed
Labels
priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/appsCategorizes an issue or PR as relevant to SIG Apps.Categorizes an issue or PR as relevant to SIG Apps.
Description
Problem
A frequent question that comes up on Slack and Stack Overflow is how to trigger an update to a Deployment/RS/RC when the image tag hasn't changed but the underlying image has.
Consider:
- There is an existing Deployment with image
foo:latest - User builds a new image
foo:latest - User pushes
foo:latestto their registry - User wants to do something here to tell the Deployment to pull the new image and do a rolling-update of existing pods
The problem is that there is no existing Kubernetes mechanism which properly covers this.
Current Workarounds
- Always change the image tag when deploying a new version
- Refer to the image hash instead of tag, e.g.
localhost:5000/andy/busybox@sha256:2aac5e7514fbc77125bd315abe9e7b0257db05fe498af01a58e239ebaccf82a8 - Use
latesttag orimagePullPolicy: Alwaysand delete the pods. New pods will pull the new image. This approach doesn't do a rolling update and will result in downtime. - Fake a change to the Deployment by changing something other than the image
Possible Solutions
- Rolling restart of pods #13488 If rolling restart were implemented, users could do a rolling-restart to pull the new image.
- Have a controller that watches the image registry and automatically updates the Deployment to use the latest image hash for a given tag. See Image name/tag resolution preprocessing pass #1697 (comment)
cc @justinsb
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
priority/important-soonMust be staffed and worked on either currently, or very soon, ideally in time for the next release.Must be staffed and worked on either currently, or very soon, ideally in time for the next release.sig/appsCategorizes an issue or PR as relevant to SIG Apps.Categorizes an issue or PR as relevant to SIG Apps.