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

6/12/2018

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
-- Dan
google-compute-engine
google-kubernetes-engine
kubernetes

1 Answer

6/12/2018

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

-- vaquar khan
Source: StackOverflow