I have an nginx Dockerimage listening on some port as defined int its nginx.conf
. That image is deployed as a workload in Kubernetes (GKE) and an ingress points to it.
The image's port is - both as port
and targetPort
- set in the workload config Yaml file.
That set-up is running in a production environment.
Now I want to change the port, i.e. nginx should listen to a different port.
How do I do that without risking downtime? I'm afraid that I cannot change
- the deployed container itself
- the workload config
- the ingress config
at the very same moment. And if any of those are not in sync I would get downtime.
What is best practice in such cases? It would be nice if the ingress could point both to the old and the new port, but that's obviously not possible.