Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure Google Load Balancer to have an IPv4 and IPv6 frontend in my Kubernetes yaml?

I'm using GKE 1.10.2-gke.3 and would like to know how I can configure both IPv4 and IPv6 connectivity with my Google Load Balancer Ingress yaml.

I can configure IPv4 or IPv6 but not both. My yaml file is below. Assume I have reserved static IPv4 and IPv6 addresses called app-static-ipv4 and app-static-ipv6 respectively.

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: app-ingress
  annotations:
    kubernetes.io/ingress.global-static-ip-name: app-static-ipv6
spec:
  tls:
  - secretName: tls-certificates
  backend:
    serviceName: app-service
    servicePort: 8080
like image 390
Dan Avatar asked Jun 12 '18 16:06

Dan


People also ask

Does IPv6 support LoadBalancer?

Application Load Balancers and Network Load Balancers now support end-to-end connectivity with Internet Protocol version 6 (IPv6). Clients can now connect to application and network load balancers and access backend applications over IPv6.

How do I set a static IP address for Kubernetes LoadBalancer?

To create a LoadBalancer service with the static public IP address, add the loadBalancerIP property and the value of the static public IP address to the YAML manifest. Create a file named load-balancer-service. yaml and copy in the following YAML. Provide your own public IP address created in the previous step.


1 Answers

You can attach a IPv6 Ip to a GCLB and have the same type of routing globally as you would with IPv4.

One strategy would be to configure the GCLB with an IPv6 address to handle all IPv6 traffic. Just create an additional forwarding rule with the IPv6 address.

Then you can associate both IPv6 and IPv4 with the same load balancer and back end instances. More on IPv6 support.

https://cloud.google.com/compute/docs/load-balancing/ipv6

like image 167
vaquar khan Avatar answered Oct 10 '22 08:10

vaquar khan