2 ms·
> I was unable to find a way to force kubernetes to do a “no-op” redeploy just to get it to re-pull a tag. A deployment redeploys (i.e. creates a new ReplicaSe
by majewsky 10y ago
> I was unable to find a way to force kubernetes to do a “no-op” redeploy just to get it to re-pull a tag.
A deployment redeploys (i.e. creates a new ReplicaSet and rolling-updates to it) whenever its YAML changes. So the common way to do a "no-op" redeploy (assuming `imagePullPolicy: Always` on the containers) is to add an annotation to the PodSpec that has no actual meaning, but which you can modify to trigger the creation of and migration to a new ReplicaSet. For example, you could put a timestamp, or you just count it up every time you re-deploy.
I would discourage usage of unchanging image tags, however. When you have immutable image versions, you will have a much easier time rolling back to a previous release if the new release breaks. At $work, we use human-readable timestamps most of the time, e.g. `201702210945`, that signify when the image was built.
> The final question I don’t have a satisfying answer for is how to deploy configuration data into my docker images.
Did the author look at https://github.com/kubernetes/helm https://github.com/kubernetes/helm?
> Kubernetes secrets are stored in plaintext in etcd, which is fine for many applications but would probably scare me at a certain scale.
Yeah, that's indeed a problem. The best you can do right now is wrap access to Kubernetes and etcd in as many layers of firewall and two-factored SSH and whatnot as you feel are necessary.
NOTE: Answer was updated multiple times while I read through the submission.