1、部署ingress-controller
1.1 下载ingress的部署文件
wget https://github.com/kubernetes/ingress-nginx/blob/master/deploy/static/mandatory.yaml
或者
wget https://raw.githubusercontent.com/kubernetes/ingress-nginx/nginx-0.30.0/deploy/static/mandatory.yaml
# 很大几率是下载不下来的
# 我上传到了阿里网盘
连接: https://www.aliyundrive.com/s/7okeshQ639u
提取码: m1r5
1.2 安装ingress
网盘里边的名字是 deploy.yaml 我们执行如下命令安装
kubectl apply -f deploy.yaml
1.3 查看状态
kubectl get pod -n ingress-nginx
# 如下显示即为正常
NAME READY STATUS RESTARTS AGE
ingress-nginx-admission-create-tqmcb 0/1 Completed 0 9d
ingress-nginx-admission-patch-74vjz 0/1 Completed 1 9d
ingress-nginx-controller-7676d46f75-jwcjc 1/1 Running 0 9d