You just containerized your static site (HTML, CSS, JS) using an nginx:alpine image. You deployed it to Kubernetes. It works locally.
Then you get the page flip: 502 Bad Gateway or random Connection Refused errors during a rolling update.
Why? Because Kubernetes thinks your container is "alive" and "ready" simply because the Nginx process is running—even if the configuration is broken, the disk is full, or the site is compiling.
Let's fix that. Here is the only guide you need for liveness and readiness probes on static sites.
The Golden Rule of Static Sites






