Sobes.tech
Senior

Mida juhtub Kuberneteses rolling update'i ajal?

sobes.tech AI

Vastus AI-lt

During a rolling update in Kubernetes, old pods are gradually replaced with new versions without stopping the entire service. This ensures continuous application availability during the update.

The process is as follows:

  1. A new pod with the updated container version is created.
  2. The new pod starts and passes the readiness check (readiness probe).
  3. After the new pod successfully starts, one of the old pods is deleted.
  4. This cycle repeats until all old pods are replaced with new ones.

This way, the update occurs in stages, minimizing downtime and failure risks.

Example command for a rolling update:

kubectl set image deployment/my-app my-container=my-image:v2

Kubernetes will automatically apply the rolling update strategy if it is configured in the Deployment.