minikube: Ingress addon: `Error: 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`
Steps to reproduce the issue:
Minikube v1.19.0 docker driver on PopOS 20.10
Using the ingress plugin, installing an ingress always fails.
Exact same steps and yaml works in v1.18.1
Doesnβt matter if the ingress is defined with apiVersion: networking.k8s.io/v1 or apiVersion: extensions/v1beta1 (yaml files used to test each work in v1.18.1)
Suspect that ansible/awx-operator#205 is the same issue.
Failing ingress definition:
- apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"networking.k8s.io/v1","kind":"Ingress","metadata":{"annotations":{"kubernetes.io/ingress.global-static-ip-name":"not-used","networking.gke.io/managed-certificates":"not-used"},"labels":{"app":"cwacc-webapp"},"name":"cwacc-webapp","namespace":"gozynta-dev"},"spec":{"rules":[{"host":"cwacc.minikube.local","http":{"paths":[{"backend":{"service":{"name":"cwacc-webapp","port":{"number":5000}}},"path":"/","pathType":"Prefix"}]}}],"tls":[{"hosts":["cwacc.minikube.local"]}]}}
kubernetes.io/ingress.global-static-ip-name: not-used
networking.gke.io/managed-certificates: not-used
labels:
app: cwacc-webapp
name: cwacc-webapp
namespace: gozynta-dev
spec:
rules:
- host: cwacc.minikube.local
http:
paths:
- backend:
service:
name: cwacc-webapp
port:
number: 5000
path: /
pathType: Prefix
tls:
- hosts:
- cwacc.minikube.local
kind: List
metadata: {}
Full output of failed command:
kubectl error: Error from server (InternalError): error when creating "gozynta-dev/profiles/cwacc": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": an error on the server ("") has prevented the request from succeeding
Error in ingress-controller: E0417 00:03:30.320457 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 cwacc-webapp in namespace gozynta-dev"
Full output of minikube start command used, if not already included:
π [cwacc] minikube v1.19.0 on Debian bullseye/sid
β¨ Automatically selected the docker driver. Other choices: kvm2, ssh, none
β Your cgroup does not allow setting memory.
βͺ More information: https://docs.docker.com/engine/install/linux-postinstall/#your-kernel-does-not-support-cgroup-swap-limit-capabilities
π Starting control plane node cwacc in cluster cwacc
π₯ Creating docker container (CPUs=3, Memory=4096MB) ...
π³ Preparing Kubernetes v1.20.2 on Docker 20.10.5 ...
βͺ Generating certificates and keys ...
βͺ Booting up control plane ...
βͺ Configuring RBAC rules ...
π Verifying Kubernetes components...
βͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
π Enabled addons: storage-provisioner, default-storageclass
π Done! kubectl is now configured to use "cwacc" cluster and "default" namespace by default
β
minikube profile was successfully set to cwacc
Switched to context "cwacc".
minikube ssh --profile cwacc sudo sysctl fs.inotify.max_user_watches=1048576
fs.inotify.max_user_watches = 1048576
minikube addons enable ingress --profile cwacc
βͺ Using image docker.io/jettech/kube-webhook-certgen:v1.5.1
βͺ Using image k8s.gcr.io/ingress-nginx/controller:v0.44.0
βͺ Using image docker.io/jettech/kube-webhook-certgen:v1.5.1
π Verifying ingress addon...
π The 'ingress' addon is enabled
Optional: Full output of minikube logs command:
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 9
- Comments: 17 (9 by maintainers)
Same problem on 1.20
Confirm, disabling the Minikube ingress addon and using the ingress-nginx helm chart from Artifact Hub fixes this. For both the Ingress and LoadBalancer to get an IP address, I have to
minikube tunnel. But avoiding this was my motivation for trying ingress-nginx, so this isnβt ideal.Same exact failure on macos 11.2.3 with virtualbox dirver as well