在 aws 上使用 k8s 的 LoadBalancer 服务的静态 IP(分配 ID)

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

它说使用 service.beta.kubernetes.io/aws-load-balancer-eip-allocations' 将 AWS EIP 分配给新创建的网络负载均衡器 (https://github.com/kubernetes/kubernetes/pull/69263)。但是,如何获取 AWS 分配 ID?
unable to give static ip to 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?

我可能误解了你的问题,但我认为你只需通过 awscli 创建 Elastic IP's in AWS and then get their Allocation Id's either in the console or by describing them

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

Type: String

Required: No