我试图将nginx-ingress安装到kubernetes 1.23,版本为3.16.1。注意:以下是在kubernetes 1.22中工作的。x。
I tried this
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install nginx-ingress ingress-nginx/ingress-nginx --version 3.16.1 --kube-context test-context --namespace=internal-namespace
但是我得到这个错误:
8 nginx.go:249] "Starting NGINX Ingress controller" │
│ E0110 13:29:40.707682 8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource │
│ E0110 13:29:41.998518 8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource │
│ E0110 13:29:45.088906 8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource │
│ E0110 13:29:50.400838 8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource │
│ E0110 13:29:58.087390 8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource │
│ E0110 13:30:11.090674 8 reflector.go:127] k8s.io/client-go@v0.19.3/tools/cache/reflector.go:156: Failed to watch *v1beta1.Ingress: failed to list *v1beta1.Ingress: the server could not find the requested resource │
│ I0110 13:30:38.827033 8 main.go:187] "Received SIGTERM, shutting down" │
│ I0110 13:30:38.827071 8 nginx.go:365] "Shutting down controller queues" │
│ E0110 13:30:38.827377 8 store.go:178] timed out waiting for caches to sync │
│ I0110 13:30:38.827413 8 nginx.go:291] "Starting NGINX process" │
│ I0110 13:30:38.827673 8 leaderelection.go:243] attempting to acquire leader lease ingress-namespace/ingress-controller-leader-nginx... │
│ I0110 13:30:38.827953 8 queue.go:78] "queue has been shutdown, failed to enqueue" key="&ObjectMeta{Name:initial-sync,GenerateName:,Namespace:,SelfLink:,UID:,ResourceVersion:,Generation:0,CreationTimestamp:0001-01-01 00:00:00 + │
│ I0110 13:30:38.827981 8 nginx.go:311] "Starting validation webhook" address=":8443" certPath="/usr/local/certificates/cert" keyPath="/usr/local/certificates/key" │
│ I0110 13:30:38.839596 8 status.go:84] "New leader elected" identity="nginx-ingress-ingress-nginx-controller-84bcfb76c7-q82gh" │
│ I0110 13:30:38.848733 8 status.go:131] "removing value from ingress status" address=[20.227.15.7] │
│ I0110 13:30:38.848778 8 nginx.go:373] "Stopping admission controller" │
│ I0110 13:30:38.848815 8 nginx.go:381] "Stopping NGINX process" │
│ E0110 13:30:38.848912 8 nginx.go:314] "Error listening for TLS connections" err="http: Server closed" │
│ 2023/01/10 13:30:38 [notice] 44#44: signal process started │
│ I0110 13:30:39.853244 8 nginx.go:394] "NGINX process has stopped" │
│ I0110 13:30:39.853269 8 main.go:195] "Handled quit, awaiting Pod deletion" │
│ I0110 13:30:49.853602 8 main.go:198] "Exiting" code=0
您很可能使用旧的Helm版本,因为Kubernetes v1.22不再提供extensions/v1beta1
。你可以在这里阅读:https://kubernetes.io/docs/reference/using-api/deprecation-guide/#ingress-v122
所以,要么使用新版本,要么发出--version
参数,你应该没问题。