Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

denied the request: rejecting admission review because the request does not contains an Ingress resource but networking.k8s.io/v1

I was upgrade kubernetes 1.19.1. then ingress deployment give this warning;

Warning: networking.k8s.io/v1beta1 Ingress is deprecated in v1.19+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress ingress.networking.k8s.io/msrs-ingress created

I have changed correct new version of ingress api ( v1beta to v1) but now I cant install again because of admission rule;

Error from server: error when creating "disabled/my-ingress-prod-v2.yaml": admission webhook "validate.nginx.ingress.kubernetes.io" denied the request: rejecting admission review because the request does not contains an Ingress resource but networking.k8s.io/v1, Resource=ingresses with name my-ingress2 in namespace my-pro

actualy I changed my-ingress2 like this;

after:

apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
  name: my-ingress
spec:
  rules:
    - http:
        paths:
          - path: /
            backend:
              serviceName: frontend
              servicePort: 80

befor:

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-ingress
spec:
  rules:
    - http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: frontend
                port:
                  number: 80

how can I found correct way to install ingress rules. I don't want to disable admission

kubectl delete -A ValidatingWebhookConfiguration ingress-nginx-admission
like image 397
alparslan Avatar asked Sep 17 '20 14:09

alparslan


1 Answers

Here is pull request which fixed it:

https://github.com/kubernetes/ingress-nginx/pull/6187

You just need to wait for new release. You can track progress here:

https://github.com/kubernetes/ingress-nginx/projects/43#card-45661384

like image 116
CheGuevara_cz Avatar answered Sep 22 '22 19:09

CheGuevara_cz