For a VM instance that is used by a Kubernetes node, I have reserved a static external IP address in VPC networks. However, the static external IP address is getting released from the VM instance at regular intervals. I can able to see that the VM instance is getting created with the same configuration with an ephemeral external IP address by removing the VM instance for which the static external IP was assigned. Is it because of the maintenance? How to maintain the static external IP address for the VM instance?
Hi @Vijay_M13
Welcome to Google Cloud Community!
It is not recommended to create and attach specific external static IP on GKE cluster nodes (managed instance groups) as it can affect the cluster's capabilities. See link to know more.
If you want internet requests leaving from your cluster (outgoing traffic) to use a static IP, you can see this link for example implementation.
I hope this information is helpful. Please let me know if you have any other questions.