2.0 waits forever to be ready DEP-812

Open2 versionsKubernetes · Hard · Fix · about 35 min ·Linux + Kubernetes

Lab machine

A private machine with its own Kubernetes cluster. Starting takes about 30 seconds. Sessions last up to 60 minutes.
Dmitri Vos opened DEP-812 at 15:50SEV-4

The 2.0.0 deploy has waited on rollout status for 20 minutes and CI gave up. Old pods still serve. The release channel wants to delete the readiness probe.

Kubernetes only replaces old pods once new ones report ready. The new pods never do, so the rollout waits, which is exactly what it should do with pods that cannot serve.

"Just delete the readiness probe so it goes green, we need 2.0 out today." (release channel)

Your task

Ship 2.0.0 to all three replicas with a readiness probe that checks an endpoint 2.0.0 actually serves. Fix manifests/ and apply.

On the machine

  • kubectl rollout status deploy/waybill, kubectl describe pod
  • manifests/deployment.yaml
  • RELEASE-2.0.md

Timeline

15:252.0.0 manifests applied.
15:45CI times out on kubectl rollout status.
15:50"Just delete the readiness probe so it goes green."

Done when

  1. All three replicas run 2.0.0 and are Ready.
  2. The readiness probe checks an endpoint 2.0.0 serves.
  3. manifests/ matches the cluster.

Hints

Hint 1

The old pods are why customers are fine; see the rollout strategy.

Hint 2

Describe a new pod and read its readiness events: what does the probe ask, and what comes back?

Hint 3

Compare the probe's path and port with RELEASE-2.0.md.

Hint 4

Point the readiness probe at what 2.0.0 serves, in the manifest, and apply it.

Show the solution

`kubectl describe pod` on a new pod shows the readiness probe failing. Compare the probe with `RELEASE-2.0.md`: 2.0.0 serves readiness at `/readyz` on the http port (8080). The probe still asks `/healthz`, or it asks `/readyz` on the retired admin port 9090. Fix `readinessProbe.httpGet` in `manifests/deployment.yaml`, apply it, and watch `kubectl rollout status deployment/waybill` complete. Consider a `/livez` liveness probe too.