ingress_helm3_install

helm3添加仓库

helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm repo add stable http://mirror.azure.cn/kubernetes/charts
helm repo update
helm repo list
helm pull stable/nginx-ingress --untar
cd nginx-ingress

添加定制的ingress模板 vi values-ingress.yaml

controller:
  image:
    repository: quay.io/kubernetes-ingress-controller/nginx-ingress-controller
  daemonset:
    useHostPort: true
  kind: DaemonSet
  minReadySeconds: 5
  updateStrategy:
    rollingUpdate:
      maxUnavailable: 1
    type: RollingUpdate
  tolerations:
    - operator: "Exists"
  nodeSelector:
    canruningress: run
  resources:
    limits:
      cpu: 100m
      memory: 256Mi
    requests:
      cpu: 100m
      memory: 128Mi
  service:
    type: ClusterIP
  metrics:
    enabled: true

# 默认后端配置
defaultBackend:
  image:
    repository: docker.io/googlecontainer/defaultbackend-amd64
  resources:
   limits:
     cpu: 10m
     memory: 20Mi
   requests:
     cpu: 10m
     memory: 20Mi

打标签可以指定ingress-controller安装在哪个节点上

kubectl label nodes k8s-master canruningress=run
helm install nginx-ingress --namespace=kube-system ./ --dry-run --debug
helm pull stable/nginx-ingress
helm install nginx-ingress -f values-ingress.yaml --namespace=kube-system ./