Ingress-Nginx 安装
下载部署文件
# Ingress-nginx Deployment YAML 文件
for file in configmap.yaml mandatory.yaml namespace.yaml rbac.yaml with-rbac.yaml; do wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/$file; done
# Service Nodeport YAML 文件
wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/baremetal/service-nodeport.yaml修改 Service Nodeport 文件
...
ports:
- name: http
port: 80
targetPort: 80
# 自定义 NodPort
# 确保重启 SVC 后,Port 不变
nodePort: 30080
protocol: TCP
- name: https
port: 443
targetPort: 443
nodePort: 30443
protocol: TCP
...部署 Ingress
测试 Ingress
创建 Nginx
创建 Ingress
部署测试应用
查看 Ingress
验证 Ingress
Last updated