Kind: using-ingress basic example won't work [Internal error occurred: failed calling webhook ...]

Created on 13 May 2020  路  8Comments  路  Source: kubernetes-sigs/kind

What happened:
Following the manual, when apply the basic example step ,got the error.
Error from server (InternalError): error when creating "usage.yaml": Internal error occurred: failed calling webhook "validate.nginx.ingress.kubernetes.io": Post https://ingress-nginx-controller-admission.ingress-nginx.svc:443/extensions/v1beta1/ingresses?timeout=30s: dial tcp 10.101.130.196:443: connect: connection refused

What you expected to happen:

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • kind version: (use kind version):
    kind v0.8.0 go1.14.2 linux/amd64

  • Kubernetes version: (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-13T11:23:11Z", GoVersion:"go1.12.12", Compiler:"gc", Platform:"linux/amd64"}
    Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-30T20:19:45Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}

  • Docker version: (use docker info):
    Client: Docker Engine - Community
    Version: 19.03.6
    API version: 1.40
    Go version: go1.12.16
    Git commit: 369ce74a3c
    Built: Thu Feb 13 01:27:49 2020
    OS/Arch: linux/amd64
    Experimental: false

    Server: Docker Engine - Community
    Engine:
    Version: 19.03.6
    API version: 1.40 (minimum version 1.12)
    Go version: go1.12.16
    Git commit: 369ce74a3c
    Built: Thu Feb 13 01:26:21 2020
    OS/Arch: linux/amd64
    Experimental: false
    containerd:
    Version: 1.2.10
    GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
    runc:
    Version: 1.0.0-rc8+dev
    GitCommit: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
    docker-init:
    Version: 0.18.0
    GitCommit: fec3683

  • OS (e.g. from /etc/os-release):
    NAME="Ubuntu"
    VERSION="18.04.4 LTS (Bionic Beaver)"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 18.04.4 LTS"
    VERSION_ID="18.04"
    HOME_URL="https://www.ubuntu.com/"
    SUPPORT_URL="https://help.ubuntu.com/"
    BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
    PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
    VERSION_CODENAME=bionic
    UBUNTU_CODENAME=bionic

kinbug

Most helpful comment

How exactly would I check if the controller is ready?

kubectl get pods -n ingress-nginx showing the ingress controller pod running and ready
Something like

NAME                                        READY   STATUS    RESTARTS   AGE
nginx-ingress-controller-68b95c77cc-jmjfn   1/1     Running   0          8h

All 8 comments

I've seen this a few of times, basically you have to wait till the ingress nginx controller becomes ready before you can create an Ingress object.
Can you see if it works after waiting some amount of time (formally till the controller becomes ready) after applying the ingress nginx manifest and before starting to use it?

/cc @aledbf
I think this started when we moved to using kind specific manifests (https://github.com/kubernetes-sigs/kind/pull/1499) which include an admission webhook.

It's not sure if it's a bug per say, but it seems to be hindering a workflow where users just quickly, consecutively follow the instructions in the guide and want to see the ingress work in action :)

Fairly new to k8s and coming across this error. How exactly would I check if the controller is ready?

edit: I can confirm that waiting a minute or 2 between steps works.

I think this started when we moved to using kind specific manifests (#1499) which include an admission webhook.

Yes, the admission webhook is enabled by default now and requires ~40 seconds the first time the ingress controller starts (SSL certificate generation) before is accepting connections

How exactly would I check if the controller is ready?

kubectl get pods -n ingress-nginx showing the ingress controller pod running and ready
Something like

NAME                                        READY   STATUS    RESTARTS   AGE
nginx-ingress-controller-68b95c77cc-jmjfn   1/1     Running   0          8h

Perhaps we should add a note to the guide?

or better yet a little one-liner to wait for ready?

One liner wait added in https://github.com/kubernetes-sigs/kind/pull/1588

Thanks @aledbf 馃檪

Thanks !

Was this page helpful?
0 / 5 - 0 ratings