1.正常买的ack开启ingress是公网slb,现在我们有部分服务只能内网访问,首先买个私网slb
root@k8s-uat-33 ~]# cat nginx-ingress-lb-intranet.yaml
# 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:
# 指明SLB实例地址类型为私网类型。
service.beta.kubernetes.io/alicloud-loadbalancer-address-type: intranet
# 修改为您的私网SLB实例ID。
service.beta.kubernetes.io/alicloud-loadbalancer-id: 'lb-uxxxxxxxxxx'
# 是否自动创建SLB端口监听(会覆写已有端口监听),也可手动创建端口监听。
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
2.内网的访问域名解析到我们的私网slb,阿里云上正常配置ingress,选择我们刚解析的域名就可以。
https://help.aliyun.com/document_detail/151506.html
标签:ingress,lb,ack,私网,nginx,公网,intranet,SLB From: https://www.cnblogs.com/Applogize/p/16978907.html