AWSLoadBalancercontrollercreatedpublic-facingLoadbalancerboundtoprivatesubnet
创始人
2024-09-26 13:30:42
0

AWS Load Balancer控制器创建了一个公共面向的负载均衡器,并将其绑定到私有子网。这可以使用以下Kubernetes YAML文件来实现:

apiVersion: elbv2.k8s.aws/v1beta1
kind: LoadBalancer
metadata:
  name: my-public-lb
  annotations:
    # Replace with the desired HTTP/HTTPS listener
    # ALB ingress controller will create this listener for you
    ingress.kubernetes.io/listen-ports: '[{"HTTP":80},{"HTTPS":443}]'
    # Replace with your VPC ID
    # ALB will serve traffic only on private subnets
    service.beta.kubernetes.io/aws-load-balancer-unschedule-timeout: '10'
    service.beta.kubernetes.io/aws-load-balancer-vpc-id: 'vpc-xxxxxxxxxxxxxxxxx'
spec:
  # Replace with your internal service
  # Make sure to use a service of type "ClusterIP"
  type: LoadBalancer
  externalTrafficPolicy: Cluster
  selector:
    app: my-app
  ports:
    - name: http
      port: 80
      protocol: TCP
      targetPort: http
    - name: https
      port: 443
      protocol: TCP
      targetPort: https
  # Replace with your subnet IDs
  # You can specify multiple subnets separated by a comma
  subnetMappings:
    - subnetID: subnet-xxxxxxxxxxxxxxxxx
    - subnetID: subnet-xxxxxxxxxxxxxxxxx

这个YAML文件定义一个公共面向的负载均衡器,它使用两个端口,80和443,并将流量限制为私有子网。它还需要一些注释来帮助您替换必要的信息。

相关内容

热门资讯

八分钟辅助!hh poker辅... 八分钟辅助!hh poker辅助器先试用,wepoker手机版辅助,窍要教程(真的有挂)运hh po...
9分钟辅助!hh poker辅... 9分钟辅助!hh poker辅助有用吗,哈糖大菠萝有没有挂,模块教程(有挂头条)1、下载好哈糖大菠萝...
三分钟辅助!cloudpoke... 三分钟辅助!cloudpoker怎么开挂,来玩app破解版,绝活教程(有挂辅助)1、点击下载安装,c...
第1分钟辅助!德州局HHpok... 您好,wepoker私人局俱乐部怎么进这款游戏可以开挂的,确实是有挂的,需要了解加去威信【48527...
第9分钟辅助!wpk是真的还是... 第9分钟辅助!wpk是真的还是假的,来玩app破解,窍门教程(有挂总结)1、金币登录送、破产送、升级...
2分钟辅助!hhpoker可以... 2分钟辅助!hhpoker可以开挂吗,拱趴大菠萝挂怎么安装,练习教程(有挂头条)1、起透看视 拱趴大...
两分钟辅助!fishpoker... 两分钟辅助!fishpoker透视底牌,wepoker透视最简单三个步骤,演示教程(竟然有挂)1、金...
第三分钟辅助!hhpoker作... 第三分钟辅助!hhpoker作弊码,wepoker怎么看底牌,手段教程(有挂教程)wepoker怎么...
第9分钟辅助!aapoker辅... 第9分钟辅助!aapoker辅助器是真的吗,aa poker辅助包,绝活儿教程(有挂助手)1.aap...
第2分钟辅助!wepoker免... 第2分钟辅助!wepoker免费透视脚本,wepoker免费透视,指南教程(有挂细节)1、wepok...