I have a Kubernetes cluster running on Google Compute Engine and I would like to assign static IP addresses to my external services (type: LoadBalancer
). I am unsure about whether this is possible at the moment or not. I found the following sources on that topic:
- Kubernetes Service Documentation lets you define an external IP address, but it fails with cannot unmarshal object into Go value of type []v1.LoadBalancerIngress
- The publicIPs field seems to let me specify external IPs, but it doesn't seem to work either
- This Github issue states that what I'm trying to do is not supported yet, but will be in Kubernetes v1.1
- The clusterIP field also lets me specify an IP address, but fails with "provided IP is not in the valid range"
I feel like the usage of static IPs is quite important when setting up web services. Am I missing something here? I'd be very grateful if somebody could enlighten me here!
EDIT: For clarification: I am not using Container Engine, I set up a cluster myself using the official installation instructions for Compute Engine. All IP addresses associated with my k8s services are marked as "ephemeral", which means recreating a kubernetes service may lead to a different external IP address (which is why I need them to be static).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…