繁体   English   中英

在service.beta.kubernetes.io/aws-load-balancer-type注释中指定nlb时创建的经典负载均衡器

[英]Classic load balancer created when specifying nlb in service.beta.kubernetes.io/aws-load-balancer-type annotation

我正在定义这样的kubernetes服务:

kind: Service
apiVersion: v1
metadata:
  name: de-identity-svc
  labels:
    app: api-identity
    environment: de
    product: api
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-additional-resource-tags: "app=api-identity,environment=de,product=api"
    service.beta.kubernetes.io/aws-load-balancer-backend-protocol: http
    service.beta.kubernetes.io/aws-load-balancer-internal: 0.0.0.0/0
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
spec:
  type: LoadBalancer
  selector:
    app: api-identity
    environment: de
  ports:
  - port: 80
    protocol: TCP

但是,在AWS中创建负载均衡器时,将使用Classic类型而不是预期的network类型创建负载均衡器。


编辑

kubernetes的版本信息是这样的:

Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T05:28:34Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.11", GitCommit:"b13f2fd682d56eab7a6a2b5a1cab1a3d2c8bdd55", GitTreeState:"clean", BuildDate:"2017-11-25T17:51:39Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}

编辑2

@vdMeent所述 ,此功能已在Kubernetes 1.9( https://aws.amazon.com/blogs/opensource/network-load-balancer-support-in-kubernetes-1-9/ )中添加。

您应该将服务器Kubernetes版本升级到1.9或更高版本,因为NLB仅适用于Kubernetes 1.9及更高版本 请注意,NLB仍处于alpha状态,因此您不应将其用于任何实质性的生产环境。

暂无
暂无

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

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