簡體   English   中英

Static IP 到在 aws 上使用 k8s 的 LoadBalancer 服務(分配 ID)

[英]Static IP to LoadBalancer service using k8s on aws (Allocation IDs)

它說使用 service.beta.kube.netes.io/aws-load-balancer-eip-allocations' 將 AWS EIP 分配給新創建的網絡負載均衡器 ( https://github.com/kube.netes/kube.netes /拉/69263 )。 但是,如何獲取 AWS 分配 ID?
無法將 static ip 提供給 nlb時,

kind: Service
apiVersion: v1
metadata:
  name: ingress-nginx
  namespace: ingress-nginx
  labels:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: nlb
    service.beta.kubernetes.io/aws-load-balancer-eip-allocations: "eipalloc- 
    07e3afcd4b7b5d644,eipalloc-0d9cb0154be5ab55d,eipalloc-0e4e5ec3df81aa3ea"
    service.beta.kubernetes.io/aws-load-balancer-subnets: "subnet- 
    061f4a497621a7179,subnet-001c2e5df9cc93960"
spec:
  type: LoadBalancer
  selector:
    app.kubernetes.io/name: ingress-nginx
    app.kubernetes.io/part-of: ingress-nginx

如何獲得這些 eipalloc ID?

我可能誤解了你的問題,但我認為你只需在 AWS 中創建彈性 IP ,然后在控制台中或通過 awscli 描述它們來獲取它們的分配 ID。

AllocationId
[Network Load Balancers] The allocation ID of the Elastic IP address for an internet-facing load balancer.

Type: String

Required: No

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM