kubernetes deployment - ghdrako/doc_snipets GitHub Wiki
Changing the image for Pods in the Deployment results in a new ReplicaSet
A rollout strategy is defined in the Deployment spec:
If you wanted to change the strategy to recreate, you would change the type from rollingUpdate to Recreate and delete the lines that start with rollingUpdate, maxSurge, and maxUnavailable. A recreate strategy is good for many Deployments because it offers the fastest rollout strategy, but will be downtime.
kubectl set env deployment/conference-frontend-deployment FEATURE_DEBUG_ENABLED=true
All the existing pods managed by this deployment will be upgraded to have the new specification(in this example to include the new FEATURE_DEBUG_ENABLED environment variable). This upgrade, by default, will start a new pod with the new specification and wait for it to be ready before terminating the old version of the pod. This process will be repeated until all the pods (replicas for the deployment) are using the new configuration.