简体   繁体   English

如何配置Google Load Balancer以在我的Kubernetes yaml中拥有IPv4和IPv6前端?

[英]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. 我正在使用GKE 1.10.2-gke.3,并且想知道如何使用我的Google Load Balancer Ingress yaml配置IPv4和IPv6连接。

I can configure IPv4 or IPv6 but not both. 我可以配置IPv4或IPv6,但不能同时配置两者。 My yaml file is below. 我的yaml文件在下面。 Assume I have reserved static IPv4 and IPv6 addresses called app-static-ipv4 and app-static-ipv6 respectively. 假设我已经分别保留了名为app-static-ipv4和app-static-ipv6的静态IPv4和IPv6地址。

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

You can attach a IPv6 Ip to a GCLB and have the same type of routing globally as you would with IPv4. 您可以将IPv6 Ip附加到GCLB,并使用与IPv4相同的全局路由类型。

One strategy would be to configure the GCLB with an IPv6 address to handle all IPv6 traffic. 一种策略是使用IPv6地址配置GCLB以处理所有IPv6流量。 Just create an additional forwarding rule with the IPv6 address. 只需使用IPv6地址创建其他转发规则即可。

Then you can associate both IPv6 and IPv4 with the same load balancer and back end instances. 然后,您可以将IPv6和IPv4与相同的负载均衡器和后端实例相关联。 More on IPv6 support. 有关IPv6支持的更多信息

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM