Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kind nginx ingress validation webhook failed calling "validate.nginx.ingress.kubernetes.io": an error on the server ("") has prevented the request from succeeding #7306

Closed
seizadi opened this issue Jul 1, 2021 · 5 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@seizadi
Copy link

seizadi commented Jul 1, 2021

NGINX Ingress controller version: v0.47.0

Kubernetes version (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"19", GitVersion:"v1.19.3", GitCommit:"1e11e4a2108024935ecfcb2912226cedeafd99df", GitTreeState:"clean", BuildDate:"2020-10-14T12:50:19Z", GoVersion:"go1.15.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.1", GitCommit:"5e58841cce77d4bc13713ad2b91fa0d961e69192", GitTreeState:"clean", BuildDate:"2021-05-21T23:01:33Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}

Environment: kind

  • Cloud provider or hardware configuration: Macbook
  • OS (e.g. from /etc/os-release): MacOS
  • Kernel (e.g. uname -a):
  • Darwin sc-l-seizadi.lan 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64
  • Install tools:
  • Others:

What happened:
Could not Install Ingress due to Validation Error

❯ helm install cmdb .
Error: Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": an error on the server ("") has prevented the request from succeeding

From Ingress Controller Logs...
❯ k --namespace ingress-nginx logs ingress-nginx-controller-744f97c4f-c5888

NGINX Ingress controller
Release: v0.47.0
Build: 7201e37
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.20.1


I0630 18:38:11.456936 7 flags.go:208] "Watching for Ingress" class="nginx"
W0630 18:38:11.457010 7 flags.go:213] Ingresses with an empty class will also be processed by this Ingress controller
....
....
E0630 19:00:14.051721 7 server.go:84] "failed to process webhook request" err="rejecting admission review because the request does not contain an Ingress resource but networking.k8s.io/v1, Kind=Ingress with name cmdb in namespace default"

What you expected to happen:
Ingress should be have installed rather than rejected by validation webhook.

There is a regression with kind nginx ingress, see similar issue with minikube: kubernetes/minikube#11121

How to reproduce it:

Install kind

Install the ingress controller

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/kind/deploy.yaml

Install following Ingress using helm:

echo "
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: RELEASE-NAME-cmdb
namespace: default
labels:
helm.sh/chart: cmdb-0.3.0
app.kubernetes.io/name: cmdb
app.kubernetes.io/instance: RELEASE-NAME
app.kubernetes.io/version: "seizadi-dev-4d95422-unsupported"
app.kubernetes.io/managed-by: Helm
spec:
rules:
- host: "localhost"
http:
paths:
- path: /cmdb
pathType: ImplementationSpecific
backend:
service:
name: RELEASE-NAME-cmdb
port:
number: 8080

" | kubectl apply -f -

Anything else we need to know:

I reverted to the older nginx deployment before the last PR merge and it worked, so this is a work around until issue is resolved:
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/a8408cdb51086a099a2c71ed3e68363eb3a7ae60/deploy/static/provider/kind/deploy.yaml

/kind bug

@seizadi seizadi added the kind/bug Categorizes issue or PR as related to a bug. label Jul 1, 2021
@kundan2707
Copy link
Contributor

/assign

@rikatz
Copy link
Contributor

rikatz commented Jul 1, 2021

duplicate of #7305

Please take a look there, as we're suggesting people now to use the older nginx controller version in this case

/close

@k8s-ci-robot
Copy link
Contributor

@rikatz: Closing this issue.

In response to this:

duplicate of #7305

Please take a look there, as we're suggesting people now to use the older nginx controller version in this case

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@seizadi
Copy link
Author

seizadi commented Jul 1, 2021

I did not find #7305 because before I opened this Issue I searched for open Issues. You had closed #7305 and also are closing this one so until search engines index these people will have a hard time finding them to resolve their Issues. I suggest you keep this Issue or #7305 open until you have fixed it with a PR, so that install using kind docs does not cause problem. If there is work around does not mean you can close #7305 or #7306, please keep one open.

@BenTheElder
Copy link
Member

xref: kubernetes-sigs/kind#2306

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

5 participants