ingress-nginx: k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress
NGINX Ingress controller version:
NGINX Ingress controller
Release: v0.47.0
Build: 7201e37633485d1f14dbe9cd7b22dd380df00a07
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.20.1
Kubernetes version (use kubectl version
):
[root@m-k8s ~]# kubectl version
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.0", GitCommit:"c2b5237ccd9c0f1d600d3072634ca66cefdf272f", GitTreeState:"clean", BuildDate:"2021-08-04T18:03:20Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.0", GitCommit:"c2b5237ccd9c0f1d600d3072634ca66cefdf272f", GitTreeState:"clean", BuildDate:"2021-08-04T17:57:25Z", GoVersion:"go1.16.6", Compiler:"gc", Platform:"linux/amd64"}
Environment:
-
Cloud provider or hardware configuration:
- BareMetal(VM Enviroment)
-
OS (e.g. from /etc/os-release):
[root@m-k8s ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
- Kernel (e.g.
uname -a
):
[root@m-k8s ~]# uname -a
Linux m-k8s 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
-
Install tools:
- Not special
-
Others:
- None
What happened:
I have encountered reflector
still point out v1beta1.ingress even I follow compatible procedure for newest 1.22.
Support Versions table
Ingress-nginx version | k8s supported version | Alpine Version | Nginx Version |
---|---|---|---|
v1.0.0-alpha.2 << | 1.22, 1.21, 1.20, 1.19 | 3.13.5 | 1.20.1 |
v1.0.0-alpha.1 | 1.21, 1.20, 1.19 | 3.13.5 | 1.20.1 |
v0.48.1 | 1.21, 1.20, 1.19 | 3.13.5 | 1.20.1 |
v0.47.0 | 1.21, 1.20, 1.19 | 3.13.5 | 1.20.1 |
v0.46.0 | 1.21, 1.20, 1.19 | 3.13.2 | 1.19.6 |
[root@m-k8s ~]# k get po -n ingress-nginx
NAME READY STATUS RESTARTS AGE
ingress-nginx-admission-create--1-zh5fn 0/1 ContainerCreating 0 4s
ingress-nginx-admission-patch--1-zdftk 0/1 Error 0 4s
ingress-nginx-controller-86db694fd4-kd22m 0/1 ContainerCreating 0 4s
[root@m-k8s ~]# k logs -n ingress-nginx ingress-nginx-controller-86db694fd4-kd22m
-------------------------------------------------------------------------------
NGINX Ingress controller
Release: v0.47.0
Build: 7201e37633485d1f14dbe9cd7b22dd380df00a07
Repository: https://github.com/kubernetes/ingress-nginx
nginx version: nginx/1.20.1
-------------------------------------------------------------------------------
I0806 07:23:28.379942 6 flags.go:208] "Watching for Ingress" class="nginx"
W0806 07:23:28.380175 6 flags.go:213] Ingresses with an empty class will also be processed by this Ingress controller
W0806 07:23:28.380901 6 client_config.go:614] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
I0806 07:23:28.381299 6 main.go:241] "Creating API client" host="https://10.96.0.1:443"
I0806 07:23:28.401118 6 main.go:285] "Running in Kubernetes cluster" major="1" minor="22" git="v1.22.0" state="clean" commit="c2b5237ccd9c0f1d600d3072634ca66cefdf272f" platform="linux/amd64"
I0806 07:23:28.937819 6 main.go:105] "SSL fake certificate created" file="/etc/ingress-controller/ssl/default-fake-certificate.pem"
I0806 07:23:28.945494 6 main.go:115] "Enabling new Ingress features available since Kubernetes v1.18"
W0806 07:23:28.949544 6 main.go:127] No IngressClass resource with name nginx found. Only annotation will be used.
I0806 07:23:29.046851 6 ssl.go:532] "loading tls certificate" path="/usr/local/certificates/cert" key="/usr/local/certificates/key"
I0806 07:23:29.089552 6 nginx.go:254] "Starting NGINX Ingress controller"
I0806 07:23:29.130956 6 event.go:282] Event(v1.ObjectReference{Kind:"ConfigMap", Namespace:"ingress-nginx", Name:"ingress-nginx-controller", UID:"dcaac7a0-a91f-4aa8-9a31-f5f90ccfc6d8", APIVersion:"v1", ResourceVersion:"74715", FieldPath:""}): type: 'Normal' reason: 'CREATE' ConfigMap ingress-nginx/ingress-nginx-controller
E0806 07:23:30.227849 6 reflector.go:138] k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E0806 07:23:31.581614 6 reflector.go:138] k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E0806 07:23:33.264973 6 reflector.go:138] k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E0806 07:23:38.431993 6 reflector.go:138] k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
E0806 07:23:45.072547 6 reflector.go:138] k8s.io/client-go@v0.20.2/tools/cache/reflector.go:167: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource
What you expected to happen: properly deployed without error đ
How to reproduce it:
-
Download this bundle pack https://github.com/kubernetes/ingress-nginx/releases/tag/controller-v1.0.0-alpha.2
-
deploy this locationâs manifest deploy/static/provider/baremetal/deploy.yaml
-
And check above
/kind bug
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 3
- Comments: 27 (10 by maintainers)
Hi @sysnet4admin
So for ingress v1, some things have changed with Ingress Class:
--watch-ingress-without-class=true
Can you please make a new attempt and let us know?Thanks!
I am on Minikube version 1.23 and am seeing the same problem. Should I still need to use the beta version?
1st options is worked on properly too. but it should(?) remove
ValidatingWebhookConfiguration
ingress-nginx-admission
to apply ingress backend configuration.Here is the result of 1st option.
Check before run
Actual run
@rikatz I appropriate your help. It solve by 2nd option and I aim to try 1st option due to my curiosity đ Here is the result of 2nd option.
Ok. Can you try this one and give feedback. https://github.com/kubernetes/ingress-nginx/blob/3c0bfc1ca3eb48246b12e77d40bde1162633efae/deploy/static/provider/baremetal/deploy.yaml
https://github.com/kubernetes/ingress-nginx/blob/main/charts/ingress-nginx/values.yaml#L67
If your kubernetes version is 1.22, can you try the beta release of the controller and provide feedback https://github.com/kubernetes/ingress-nginx/releases/download/helm-chart-4.0.0/ingress-nginx-4.0.0.tgz
/remove-kind bug /kind feature