iN2gN3jT

导航

Nginx Ingress Controller 的部署和使用

使用 helm 部署 Nginx Ingress Controller

参见: Use Helm to Install NGINX Ingress Controller with NGINX Open Source | NGINX Documentation

cat > nginx-ingress-values.yaml << EOF
controller:
  service:
    type: NodePort
    externalTrafficPolicy: Cluster
    httpPort:
      nodePort: 30080
    httpsPort:
      nodePort: 30443
EOF
helm install nginx-ingress oci://ghcr.io/nginx/charts/nginx-ingress \
  --namespace=nginx-ingress \
  --create-namespace \
  -f nginx-ingress-values.yaml

查看安装状态

$ kubectl  get pods|grep nginx-ingress
nginx-ingress-controller-6b5b9d58dc-mg8wh  1/1  Running  0  2m17s
$ kubectl  api-resources | grep -i ingress
ingressclasses        networking.k8s.io/v1    false    IngressClass
ingresses      ing    networking.k8s.io/v1    true     Ingress

posted on 2026-10-27 15:52  笔记和文档  阅读(10)  评论(0)    收藏  举报