1.

Are deployments with more than one replica automatically doing rolling updates when a new deployment config is applied?

Answer»

The Deployment updates Pods in a ROLLING update fashion when .spec.strategy.type==RollingUpdate .You can specify maxUnavailable and maxSurge to CONTROL the rolling update process. Rolling update is the default deployment strategy.kubectl rolling-update updates Pods and ReplicationControllers in a SIMILAR fashion. But, Deployments are recommended, since they are declarative, and have additional features, such as rolling back to any previous revision even after the rolling update is done.So for rolling updates to WORK as one may expect, a readiness probe is essential. Redeploying deployments is easy but rolling updates will do it nicely for me without any DOWNTIME. The way to make a  rolling update of a Deployment and kubctl apply on it is as below

  • spec:
  • minReadySeconds: 180
  • replicas: 9
  • revisionHistoryLimit: 20
  • selector:
  • matchLabels:
  • deployment: standard
  • name: standard-pod
  • strategy:
  • rollingUpdate:
  • maxSurge: 1
  • maxUnavailable: 1
  • type: RollingUpdate


Discussion

No Comment Found

Related InterviewSolutions