Quantcast
Viewing all articles
Browse latest Browse all 49

Answer by blacktide for How to scale up all OpenShift pods before scaling down old ones

You can combine the rollout strategy with readiness checks with an initial delay to ensure that all the new pods have time to start up before the old ones are all shut down at the same time.

In the case below, the new 3 pods will be spun up (for a total of 6 pods) and then after 60 seconds, the readiness check will occur and the old pods will be shut down. You would just want to adjust your readiness delay to a large enough timeframe to give all of your new pods time to start up.

apiVersion: v1kind: DeploymentConfigspec:  replicas: 3  strategy:    rollingParams:      maxSurge: 3      maxUnavailable: 0    type: Rolling  template:    spec:      containers:        - readinessProbe:            httpGet:              path: /actuator/health/readiness              port: 8099            initialDelaySeconds: 60

Viewing all articles
Browse latest Browse all 49

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>