kubernetes Ingress Controller 安装

      kubernetes Ingress Controller 安装已关闭评论

// 创建 ingress controller

$ kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/mandatory.yaml
$ kubectl get pods –n ingress-nginx

// 创建 ingress service

$ wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/provider/baremetal/servicenodeport.yaml
$ vi service-nodeport.yaml          # 修改文件如下
...
---
ports:
- name: http
port: 80
targetPort: 80
nodePort: 30080
protocol: TCP
- name: https
port: 443
targetPort: 443
nodePort: 30043
protocol: TCP
---
...

$ kubectl apply -f service-nodeport.yaml
$ kubectl get svc –n ingress-nginx

参考地址:
文档: https://kubernetes.io/docs/concepts/services-networking/ingress/
源码: https://github.com/kubernetes/ingress-nginx/
部署: https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md