创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。

操作系统信息
虚拟机,CentOS Linux release 7.6.1810 (Core),4C/8G

Kubernetes版本信息
kubectl version 命令执行结果贴在下方

Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:41:28Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}

Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}

容器运行时
[root@k8s ~]# crictl version

W1224 17:22:23.604059 85787 util_unix.go:103] Using "/run/containerd/containerd.sock" as endpoint is deprecated, please consider using full url format "unix:///run/containerd/containerd.sock".

Version: 0.1.0

RuntimeName: containerd

RuntimeVersion: 1.4.3

RuntimeApiVersion: v1alpha2

KubeSphere版本信息
v3.2.1。在线安装。在已有K8s上安装。

问题是什么
kubesphere-router-p1报错日志

2021-12-24T17:24:54.801287963+08:00 -------------------------------------------------------------------------------

2021-12-24T17:24:54.801347903+08:00 NGINX Ingress controller

2021-12-24T17:24:54.801355907+08:00 Release: v0.48.1

2021-12-24T17:24:54.801360429+08:00 Build: 30809c066cd027079cbb32dccc8a101d6fbffdcb

2021-12-24T17:24:54.801367415+08:00 Repository: https://github.com/kubernetes/ingress-nginx

2021-12-24T17:24:54.801372765+08:00 nginx version: nginx/1.20.1

2021-12-24T17:24:54.801377401+08:00

2021-12-24T17:24:54.801383478+08:00 -------------------------------------------------------------------------------

2021-12-24T17:24:54.801387547+08:00

2021-12-24T17:24:54.801446275+08:00 I1224 09:24:54.800687 7 flags.go:211] "Watching for Ingress" class="nginx"

2021-12-24T17:24:54.801459188+08:00 W1224 09:24:54.800783 7 flags.go:216] Ingresses with an empty class will also be processed by this Ingress controller

2021-12-24T17:24:54.801909232+08:00 W1224 09:24:54.801454 7 client_config.go:614] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.

2021-12-24T17:24:54.802227993+08:00 I1224 09:24:54.801920 7 main.go:241] "Creating API client" host="https://10.96.0.1:443"

2021-12-24T17:24:54.819973780+08:00 I1224 09:24:54.819364 7 main.go:285] "Running in Kubernetes cluster" major="1" minor="22" git="v1.22.3" state="clean" commit="c92036820499fedefec0f847e2054d824aea6cd1" platform="linux/amd64"

2021-12-24T17:24:55.534047130+08:00 I1224 09:24:55.533668 7 main.go:105] "SSL fake certificate created" file="/etc/ingress-controller/ssl/default-fake-certificate.pem"

2021-12-24T17:24:55.538226484+08:00 I1224 09:24:55.537908 7 main.go:115] "Enabling new Ingress features available since Kubernetes v1.18"

2021-12-24T17:24:55.541297553+08:00 W1224 09:24:55.541138 7 main.go:127] No IngressClass resource with name nginx found. Only annotation will be used.

2021-12-24T17:24:55.610672843+08:00 I1224 09:24:55.610398 7 nginx.go:254] "Starting NGINX Ingress controller"

2021-12-24T17:24:56.721609860+08:00 E1224 09:24:56.721081 7 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

2021-12-24T17:24:57.636113069+08:00 E1224 09:24:57.635585 7 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

2021-12-24T17:25:00.460472544+08:00 E1224 09:25:00.459783 7 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

2021-12-24T17:25:05.749561387+08:00 E1224 09:25:05.749045 7 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

2021-12-24T17:25:16.762212014+08:00 E1224 09:25:16.761833 7 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

    1 个月 后

    感觉是 K8s 1.22 有版本不兼容的问题,@RolandMa1986 有空了帮忙看下这个问题有没有建议的解决方案吧。

      ---—————————————————————————-

      NGINX Ingress controller

      Release: v0.48.1

      Build: 30809c066cd027079cbb32dccc8a101d6fbffdcb

      Repository: https://github.com/kubernetes/ingress-nginx

      nginx version: nginx/1.20.1

      ---—————————————————————————-

      I0124 08:58:46.218276 7 flags.go:211] “Watching for Ingress” class=“nginx”

      W0124 08:58:46.218334 7 flags.go:216] Ingresses with an empty class will also be processed by this Ingress controller

      W0124 08:58:46.218642 7 client_config.go:614] Neither –kubeconfig nor –master was specified. Using the inClusterConfig. This might not work.

      I0124 08:58:46.218873 7 main.go:241] “Creating API client” host=“https://192.168.0.1:443

      I0124 08:58:46.232062 7 main.go:285] “Running in Kubernetes cluster” major=“1” minor=“22+” git=“v1.22.3-aliyun.1” state=“clean” commit=“2d7fa03ee32075acb101bc7286176439c3edddf1” platform=“linux/amd64”

      I0124 08:58:46.327824 7 main.go:105] “SSL fake certificate created” file=“/etc/ingress-controller/ssl/default-fake-certificate.pem”

      I0124 08:58:46.331061 7 main.go:115] “Enabling new Ingress features available since Kubernetes v1.18”

      W0124 08:58:46.334190 7 main.go:127] No IngressClass resource with name nginx found. Only annotation will be used.

      I0124 08:58:46.368838 7 nginx.go:254] “Starting NGINX Ingress controller”

      I0124 08:58:46.391572 7 event.go:282] Event(v1.ObjectReference{Kind:“ConfigMap”, Namespace:“kubesphere-controls-system”, Name:“kubesphere-router-kubesphere-system”, UID:“9f111a5e-7990-4530-8ca2-23200ee75408”, APIVersion:“v1”, ResourceVersion:“662702”, FieldPath:""}): type: ‘Normal’ reason: ‘CREATE’ ConfigMap kubesphere-controls-system/kubesphere-router-kubesphere-system

      E0124 08:58:47.473112 7 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

      E0124 08:58:48.524105 7 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

      E0124 08:58:50.335818 7 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

      E0124 08:58:55.583542 7 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

      2022/01/24 08:58:59 Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      W0124 08:58:59.023781 7 nginx_status.go:172] unexpected error obtaining nginx status info: Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      E0124 08:59:08.348042 7 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

      2022/01/24 08:59:11 Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      W0124 08:59:11.333951 7 nginx_status.go:172] unexpected error obtaining nginx status info: Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      E0124 08:59:23.047817 7 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

      2022/01/24 08:59:29 Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      W0124 08:59:29.024231 7 nginx_status.go:172] unexpected error obtaining nginx status info: Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      2022/01/24 08:59:41 Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      W0124 08:59:41.333917 7 nginx_status.go:172] unexpected error obtaining nginx status info: Get “http://127.0.0.1:10246/nginx_status”: dial tcp 127.0.0.1:10246: connect: connection refused

      I0124 08:59:45.001224 7 main.go:187] “Received SIGTERM, shutting down”

      I0124 08:59:45.001254 7 nginx.go:372] “Shutting down controller queues”

      E0124 08:59:45.001456 7 store.go:178] timed out waiting for caches to sync

      I0124 08:59:45.001514 7 nginx.go:296] “Starting NGINX process”

      I0124 08:59:45.001692 7 leaderelection.go:243] attempting to acquire leader lease kubesphere-controls-system/ingress-controller-leader-kubesphere-router-kubesphere-system-nginx…

      I0124 08:59:45.002035 7 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 +0000 UTC,DeletionTimestamp:<nil>,DeletionGracePeriodSeconds:nil,Labels:map[string]string{},Annotations:map[string]string{},OwnerReferences:[]OwnerReference{},Finalizers:[],ClusterName:,ManagedFields:[]ManagedFieldsEntry{},}”

      I0124 08:59:45.012724 7 status.go:84] “New leader elected” identity=“kubesphere-router-kubesphere-system-cc6cc8cc-tvqnj”

      I0124 08:59:45.023240 7 status.go:132] “removing value from ingress status” address=[39.105.125.175]

      I0124 08:59:45.023294 7 nginx.go:388] “Stopping NGINX process”

      2022/01/24 08:59:45 [notice] 40#40: signal process started

      I0124 08:59:46.027983 7 nginx.go:401] “NGINX process has stopped”

      I0124 08:59:46.028002 7 main.go:195] “Handled quit, awaiting Pod deletion”

      I0124 08:59:56.028124 7 main.go:198] “Exiting” code=0

      1 个月 后

      请问能否单独升级kubesphere-router-kubesphere-system-ingress?

      距离上一个版本已经2个多月了..

      5 天 后
      4 个月 后