# intranet nginx ingress slb service
apiVersion: v1
kind: Service
metadata:
  # 这里服务取名为nginx-ingress-lb-intranet
  name: nginx-ingress-lb-intranet
  namespace: kube-system
  labels:
    app: nginx-ingress-lb-intranet
  annotations:
    service.beta.kubernetes.io/alicloud-loadbalancer-address-type: intranet
    # 修改为您的私网SLB实例ID
    service.beta.kubernetes.io/alicloud-loadbalancer-id: [$SLB_ID]
    #service.beta.kubernetes.io/alicloud-loadbalancer-force-override-listeners: 'true'
spec:
  type: LoadBalancer
  # route traffic to other nodes
  externalTrafficPolicy: "Cluster"
  ports:
  - port: 80
    name: http
    targetPort: 80
  - port: 443
    name: https
    targetPort: 443
  selector:
    # select app=ingress-nginx pods
    app: ingress-nginx

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code