Using static IPs with canary deployments in GKE using nginx

8/13/2019

I am looking to use a canary deployment in GKE. What I have is the following:

  • Ingress controller and ingress deployed in a "prod" namespace. The ingress is assigned a static IP.
  • Services deployed in prod and canary namespaces
  • Can reach the services ok in the prod namespace.

The issue is when I try to create a configuration for the canary ingress in the canary namespace. What appears to happen is that it does not use the static IP and instead tries to be assigned a new one.

Is it possible to use canary deployments with NGINX in GKE with static IPs?

-- user2079098
canary-deployment
google-kubernetes-engine
nginx-ingress

1 Answer

8/14/2019

You can find a workaround for this in the StackOverflow thread here or by following the steps outlined in the official Kubernetes Github account to use static IP for your canary deployment in GKE. Bear in mind that you need a TLS cert and to make sure your Ingress targets exactly one Ingress controller by specifying the ingress.class annotation, and that you have an ingress controller running in your cluster.

-- Sandro G
Source: StackOverflow