patternkubernetesMinor
Kubernetes Deployments & Rollbacks
Viewed 0 times
rollbackskubernetesdeployments
Problem
At the moment I'm performing Kubernetes deployments by applying
If I understand correctly, each time I apply
Is this best practice or should I be creating a new
My next question concerns rollbacks, if I run
deployment.yaml then updating the container/pod image versions with kubectl set-image as outlined in the docs. I'm doing this using Jenkins.If I understand correctly, each time I apply
kubectl set-image it updates the deployment in situ creating a new ReplicaSet meaning that I don't need to create a new deployment.yaml for each version bump. Is this best practice or should I be creating a new
deployment.yaml every time we bump version?My next question concerns rollbacks, if I run
kubectl rollout history deployment/name, I see three revisions but no 'cause'. I think this is because I've not specified --record on the initial deployment, and does that record each time we do a set-version too?Solution
I think it might be a good idea to update deployment.yaml for each version/release and commit to git so that later, any other person may follow through and even revert back to an earlier release/version.
Context
StackExchange DevOps Q#4825, answer score: 2
Revisions (0)
No revisions yet.