无法在 kubernetes 服务中添加 ipv6 类型的负载均衡器 IP

问题描述 投票:0回答:0

我在 GKE 上,我正在尝试公开一个使用 IPV6 地址的应用程序。

这是我的服务.yaml

apiVersion: v1
kind: Service
metadata:
  annotations:
    cloud.google.com/neg: '{"ingress":true}'
  labels:
    run: ubuntu
  name: ubuntu
  namespace: default
spec:
  loadBalancerIP: "<ipv6-address>"
  ipFamilies:
  - IPv6
  ipFamilyPolicy: SingleStack
  ports:
  - nodePort: 30783
    port: 5000
    protocol: TCP
    targetPort: 5001
  selector:
    run: ubuntu
  sessionAffinity: None
  type: LoadBalancer

这是我的gcloud地址列表

deletable-pzk-reg-ip2-6           <ipv6-address>/96  EXTERNAL                    us-central1  pzksubnet1  RESERVED

我收到这个错误

  Warning  SyncLoadBalancerFailed  13s (x6 over 2m49s)  service-controller  Error syncing load balancer: failed to ensure load balancer: requested ip "<ipv6-address>" is neither static nor assigned to the LB

请帮我调试这个。

kubernetes service google-kubernetes-engine ipv6
© www.soinside.com 2019 - 2024. All rights reserved.