Welcome to the Linux Foundation Forum!

Exercise 11.2: Ingress Controller - Error when creating ingress.yaml

Options

Hi all,

Exercise 11.2: Ingress Controller - Step 7 - create ingress rules - fails!

Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.0", GitCommit:"1b4df30b3cdfeaba6024e81e559a6cd09a089d65", GitTreeState:"clean", BuildDate:"2023-04-11T17:10:18Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1
Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.1", GitCommit:"8f94681cd294aa8cfd3407b8191f6c70214973a4", GitTreeState:"clean", BuildDate:"2023-01-18T15:51:25Z", GoVersion:"go1.19.5", Compiler:"gc", Platform:"linux/amd64"}

I went through the exercise as described and deployed the "myingress-ingress-nginx-controller". But when you try to create the rules as described in step 7, I'll receive an error message:

Error from server (InternalError): error when creating "ingress.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": failed to call webhook: Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": service "ingress-nginx-controller-admission" not found

But:

$ kubectl get po
NAME                                       READY   STATUS    RESTARTS   AGE
myingress-ingress-nginx-controller-thrww   1/1     Running   0          30m
myingress-ingress-nginx-controller-wlkvs   1/1     Running   0          30m
$ kubectl get svc
NAME                                           TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
kubernetes                                     ClusterIP      10.96.0.1       <none>        443/TCP                      68d
myingress-ingress-nginx-controller             LoadBalancer   10.105.74.100   <pending>     80:30836/TCP,443:30020/TCP   30m
myingress-ingress-nginx-controller-admission   ClusterIP      10.108.239.96   <none>        443/TCP                      30m

The nginx log(s) show:

NGINX Ingress controller
  Release:       v1.7.0
  Build:         72ff21ed9e26cb969052c753633049ba8a87ecf9
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.21.6

W0413 13:09:57.879721       6 controller.go:1044] Error obtaining Endpoints for Service "default/web-one": no object matching key "default/web-one" in local store

Comments

  • chrispokorni
    chrispokorni Posts: 2,208
    Options

    Hi @mag1,

    Can you paste the ingress definition in a comment, as Code block?

    Regards,
    -Chris

Categories

Upcoming Training