Description
What happened:
From kubernetes 1.18, kubernetes deprecate ingress annotation "kubernetes.io/ingress.class", instead, it is replaced with ingress.Spec.IngressClass. for cluster Ingress, it is ok. but for namespaced ingress. cluster don't want to grant any cluster resource permission to ingress-controller. it means nginx-ingrss-controller have no permissions to access the IngressClass object. in current nginx-ingress-controller, it mandate the IngressClass existence referred as ingress.Spec.IngressClassName.
As a result, for Namespaced ingress scenario, ingress annnotation "kubernetes.io/ingress.class" is the only choice. it works at this time, but from kubernets 1.28, kubernetes server keep printing warning if ingress has annotation "kubernetes.io/ingress.class". it is not ideal.
What you expected to happen:
so it is better support namespaced ingressClass without accessing the IngresClass object and using the annotation.
suggestions:
- IngressController needn't cluster level permission to access the IngressClass for namespaced Ingress
- consumer drop annotation "kubernetes.io/ingress.class" from ingress
- Consumer set the ingressClassName by ingress.Spec.IngressClassName
- IngressController accept the incoming ingress object when
- IngressController has permission to IngressClass, keep the current implementation.
- IngressController dont' have permission to access the IngressClass but ingress.Spec.IngressClassName is equals to the ingress class name specified by CLI parameter "--ingress-class"
NGINX Ingress controller version (exec into the pod and run nginx-ingress-controller --version.):
Kubernetes version (use kubectl version
): v1.29.2
Environment:
-
Cloud provider or hardware configuration:
-
OS (e.g. from /etc/os-release):
-
Kernel (e.g.
uname -a
): -
Install tools:
Please mention how/where was the cluster created like kubeadm/kops/minikube/kind etc.
-
Basic cluster related info:
kubectl version
kubectl get nodes -o wide
-
How was the ingress-nginx-controller installed:
- If helm was used then please show output of
helm ls -A | grep -i ingress
- If helm was used then please show output of
helm -n <ingresscontrollernamespace> get values <helmreleasename>
- If helm was not used, then copy/paste the complete precise command used to install the controller, along with the flags and options used
- if you have more than one instance of the ingress-nginx-controller installed in the same cluster, please provide details for all the instances
/nginx-ingress-controller --kubeconfig=/root/.kube/config
--default-ssl-certificate=core/demo1-nginx-secret
--v=0
--configmap=core/demo1-ingress-controller-conf
--watch-namespace=core
--annotations-prefix=ingress.kubernetes.io
--enable-ssl-chain-completion=false
--http-port=8080
--https-port=8443
--enable-annotation-validation=true
--update-status=false
--ingress-class=demo1-nginx
--metrics-per-host=false
--enable-metrics=false "
- If helm was used then please show output of
-
Current State of the controller:
kubectl describe ingressclasses
kubectl -n <ingresscontrollernamespace> get all -A -o wide
kubectl -n <ingresscontrollernamespace> describe po <ingresscontrollerpodname>
kubectl -n <ingresscontrollernamespace> describe svc <ingresscontrollerservicename>
-
Current state of ingress object, if applicable:
kubectl -n <appnamespace> get all,ing -o wide
kubectl -n <appnamespace> describe ing <ingressname>
- If applicable, then, your complete and exact curl/grpcurl command (redacted if required) and the reponse to the curl/grpcurl command with the -v flag
-
Others:
- Any other related information like ;
- copy/paste of the snippet (if applicable)
kubectl describe ...
of any custom configmap(s) created and in use- Any other related information that may help
- Any other related information like ;
How to reproduce this issue:
Anything else we need to know:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
No status