5

First of all, I use a GCP k8s standard cluster, which works fine. I am a bit interested in autopilot, so I tried to deploy the same pods on a k8s autopilot.

The thing is, I got many 502 errors when rolling updates pods implemented in Go Gin and Python FastAPI(uvicorn). Go is less 502 errors than Python.

I doubt that Service(ClusterIP) correctly switches traffic across pods during rolling update.

Again, the same applications works fine with the standard version, and preStop, maxSurge, and graceful shutdown in Go and Python are implemented as the following doc says. Is there any settings that are specific to Autopilot?

https://cloud.google.com/kubernetes-engine/docs/how-to/container-native-load-balancing#traffic_does_not_reach_endpoints

Takash Futada
  • 686
  • 6
  • 17
  • 1
    Can you use something like readiness probe with Autopilot ? If the 502 are temporary, the addition of the readiness probe could make it wait for the new pods to be in ready state for X seconds before redirecting trafics. In addition, Autopilot uses the "same" Kubernetes as with standard under the hood, it's just hidden to the final user, there shouldn't be a difference between cluster ip service in autopilot mode and in standard. – FairPluto Oct 07 '22 at 13:22
  • Yes, readiness probe is implemented correctly, and as I mentioned, it works well in the standard k8s, traffic won't hit until the app is ready to accept requests. – Takash Futada Oct 07 '22 at 14:31

0 Answers0