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

0 votes
Jul 19, 2019 in Kubernetes by Sam
• 6,260 points
768 views

1 answer to this question.

0 votes
  • 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
answered Jul 19, 2019 by Sirajul
• 59,230 points

Related Questions In Kubernetes

0 votes
1 answer

How to determine what is the status of a deployment ?

You could use kubectl get deployment <deployment>.  If ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
472 views
0 votes
1 answer

Is it possible for containers within a pod to communicate with each other?

Yes, it is possible for containers to ...READ MORE

answered Jul 12, 2019 in Kubernetes by Sirajul
• 59,230 points
3,538 views
+1 vote
1 answer
0 votes
3 answers

Error while joining cluster with node

Hi Kalgi after following above steps it ...READ MORE

answered Jan 17, 2019 in Others by anonymous
14,587 views
+4 votes
1 answer

Installing Web UI (Dashboard):kubernetes-dashboard on main Ubuntu 16.04.6 LTS (Xenial Xerus) server

Follow these steps: $ kubeadm reset $ kubeadm init ...READ MORE

answered Apr 12, 2019 in Kubernetes by Kalgi
• 52,360 points

reshown Apr 12, 2019 by Kalgi 6,071 views
0 votes
1 answer

Is there a way to make a pod to automatically come up when the host restarts?

Yes using replication controller but it may ...READ MORE

answered Jul 19, 2019 in Kubernetes by Sirajul
• 59,230 points
2,059 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP