<p>I want to set up an IPv6 address to service on the GKE cluster. The main reason I want to do that is I am setting up a Google Managed Certificate and connecting the service to a Domain name. The certificate requires type A and type AAAA records to be configured. I reserved an IPv6 address on VPC Network, but there is no way to assign it. Even tried editing the YAML to support IPv6 family, but it just shows the error</p>
<pre><code>The Service &quot;made-up-name&quot; is invalid: spec.ipFamilies[1]: Invalid value: []string(nil): ipfamily IPv6 is not configured on cluster
</code></pre>
<p>Here is my YAML file as of now</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: my-stream-server-depl
spec:
  replicas: 1
  selector:
    matchLabels:
      app: my-stream-server
  template:
    metadata:
      labels:
        app: my-stream-server
    spec:
      containers:
        - name: my-stream-server
          image: gcr.io/reddo-346118/my-stream-server
---
apiVersion: v1
kind: Service
metadata:
  name: my-stream-server-srv
spec:
  ipFamilyPolicy: PreferDualStack
  ipFamilies:
  - IPv4
  - IPv6
  selector:
    app: my-stream-server
  ports:
    - name: http
      protocol: TCP
      port: 8000
      targetPort: 8000
    - name: rtmp
      protocol: TCP
      port: 1935
      targetPort: 1935
---
kind: Service
apiVersion: v1
metadata:
  name: my-stream-server-rtmp
spec:
  type: LoadBalancer 
  externalTrafficPolicy: Cluster  
  ports:
  - name: rtmp
    port: 1935
    targetPort: 1935
    protocol: TCP
  selector:
    app: my-stream-server
</code></pre>

<p>GKE does not currently support IPv6 for pods or services.  You can, however, assign an IPv6 address to an external HTTP(S) load balancer.  You won't be able to do this for <em>Service</em> of type <em>LoadBalancer</em>.  You'll need to create an Ingress resource instead as Ingress creates an HTTP(S) load balancer which does support IPv6.</p>
<p>Support for dual stack on GKE is currently targeted for late 2Q 2022.</p>
