先添加Chart仓库。
helm repo add nginx-stable https://helm.nginx.com/stable
查找nginx-ingress,我们选择nginx-stable/nginx-ingress Chart。
helm search repo nginx-ingress
NAME CHART VERSION APP VERSION DESCRIPTION
bitnami/nginx-ingress-controller 5.3.11 0.30.0 Chart for the nginx Ingress controller
nginx-stable/nginx-ingress 0.4.3 1.6.3 NGINX Ingress Controller
stable/nginx-ingress 1.34.2 0.30.0 An nginx Ingress controller that uses ConfigMap...
stable/nginx-lego 0.3.1 Chart for nginx-ingress-controller and kube-lego
展示values.yaml文件,分析helm安装Nginx Ingress的命令行覆盖参数。
helm show values nginx-stable/nginx-ingress
由于Nginx Ingress的service缺省采用"type: LoadBalancer",为了外部访问,修改为"type: NodePort",顺便设置固定的nodePort。
helm install gateway nginx-stable/nginx-ingress \
--set controller.service.type=NodePort \
--set controller.service.httpPort.nodePort=30080 \
--set controller.service.httpsPort.nodePort=30443
NAME: gateway
LAST DEPLOYED: Fri Mar 27 17:53:01 2020