Kubernetes Nginx Ingress not finding service endpoint

前端 未结 2 1461
渐次进展
渐次进展 2021-02-19 21:58

I\'m having some trouble getting the Nginx ingress controller working in my Kubernetes cluster. I have created the nginx-ingress deployments, services, roles, etc., according to

2条回答
  •  旧巷少年郎
    2021-02-19 22:20

    Another situation when it may happen is when ingress class of the ingress controller does not match ingress class in the ingress resource manifest used for your services.

    Nginx installation command, short example:

      helm install stable/nginx-ingress \
      --name ${INGRESS_RELEASE_NAME} \
      --namespace ${K8S_NAMESPACE} \
      --set controller.scope.enabled=true \
      --set controller.scope.namespace=${K8S_NAMESPACE} \
      --set controller.ingressClass=${NGINX_INGRESS_CLASS}
    

    ingress resource spec. , excerpt:

    apiVersion: extensions/v1beta1
    kind: Ingress
    metadata:
      labels:
      annotations:
        # folowing line is not valid for K8s or Helm, 
        # but reflects the values must be the same
        kubernetes.io/ingress.class: ${NGINX_INGRESS_CLASS}
    

提交回复
热议问题