Kubernetes update changes static+reserved external IPs for nodes in Google Cloud

Viewed 1227

I have three nodes in my google container cluster.

Everytime i perform a kubernetes update through the web-ui on the cluster in Google Container Engine.

Google container cluster update

My external IP's change, and i have to manually assign the previous IP on all three instances in Google Cloud Console.

These are reserved static external IP set up using the following guide.

Reserving a static external IP

Has anyone run into the same problem? Starting to think this is a bug.

Perhaps you can set up the same static outbound external IP for all the instances to use, but i cannot find any information on how to do so, that would be a solution as long as it persists through updates, otherwise we've got the same issue.

It's only updates that cause this, not restarts.

2 Answers

I was having the same problem as you. We found some solutions.

  • KubeIP - But this needed a cluster 1.10 or higher. Ours is 1.8
  • NAT - At GCP documentation they talk about this method. It was too complex for me.

Our Solution We followed the documentation for assign IP addresses on GCE. Used the command line. Using this method, we didn't have any problems so far. I don't know the risks for it yet. If anyone has an idea, it would be good.

We basically just ran:

gcloud compute instances delete-access-config [INSTANCE_NAME]  --access-config-name [CONFIG_NAME]
gcloud compute instances add-access-config [INSTANCE_NAME] --access-config-name "external-nat-static" --address [IP_ADDRESS]

If anyone have any feedback on this solution. Please give it to us. @Ahmet Alp Balkan - Google

Related