使用 kubekey部署 环境:

kuberneters v1.22.1

kubeSphere v3.2.1

docker v20.10.8

问题:

创建集群网关发现容器启动失败,查看后发现镜像版本为 v0.48.1

通过修改配置文件 ks-router-config 把 kubesphere/nginx-ingress-controller 版本改为最新版本 v1.1.0 后

重新创建网关还是 v0.48.1,不知道如何去修改对应配置。

kubesphere/nginx-ingress-controller:v1.1.0 是可以正常启动的

附上启动失败日志截图

kubesphere 中的 router 是通过 CRD 管理的,查看用 kubectl get gateways.gateway.kubesphere.io,修改对应的 CRD 才会生效。

    就想知道如何指定网关 nginx-ingress-controller 版本

    kubectl edit cm  kubesphere-config -n kubesphere-system

    修改 configmap 中的 tag,修改完成后使用以下命令重启 ks-controller-manager

    kubectl rollout restart deploy ks-controller-manager -n kubesphere-system

      ruiyaoOps 大神,里面没有发现跟nginx-ingress-controller 相关的 tag呢,能够具体截图贴一下,谢谢

      I0308 09:08:53.326189       7 flags.go:211] "Watching for Ingress" class="nginx"
      W0308 09:08:53.326220       7 flags.go:216] Ingresses with an empty class will also be processed by this Ingress controller
      W0308 09:08:53.326453       7 client_config.go:614] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
      I0308 09:08:53.326803       7 main.go:241] "Creating API client" host="https://10.233.0.1:443"
      -------------------------------------------------------------------------------
      NGINX Ingress controller
        Release:       v0.48.1
        Build:         30809c066cd027079cbb32dccc8a101d6fbffdcb
        Repository:    https://github.com/kubernetes/ingress-nginx
        nginx version: nginx/1.20.1
      
      -------------------------------------------------------------------------------
      
      I0308 09:08:53.331927       7 main.go:285] "Running in Kubernetes cluster" major="1" minor="21" git="v1.21.5" state="clean" commit="aea7bbadd2fc0cd689de94a54e5b7b758869d691" platform="linux/amd64"
      I0308 09:08:53.611219       7 main.go:105] "SSL fake certificate created" file="/etc/ingress-controller/ssl/default-fake-certificate.pem"
      I0308 09:08:53.612201       7 main.go:115] "Enabling new Ingress features available since Kubernetes v1.18"
      W0308 09:08:53.679930       7 main.go:127] No IngressClass resource with name nginx found. Only annotation will be used.
      I0308 09:08:53.703856       7 nginx.go:254] "Starting NGINX Ingress controller"
      I0308 09:08:54.806258       7 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"lbz-cloud", Name:"cloud", UID:"9ede5745-faaf-4f42-ba08-6563f11de031", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"190545671", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
      I0308 09:08:54.806516       7 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"lbz-cloud", Name:"miniapp", UID:"c9ae8ab0-8f1a-4af7-a59c-285cf8059279", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"190545667", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
      I0308 09:08:54.806620       7 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"lbz-cloud", Name:"proxy", UID:"d875c4c8-ba18-4de6-b3b9-1a6aa417b70e", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"190545668", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
      I0308 09:08:54.806879       7 backend_ssl.go:66] "Adding secret to local store" name="lbz-cloud/ssl-registry-lubanzhang-com"
      I0308 09:08:54.807013       7 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"lbz-cloud", Name:"sites", UID:"40a7bbdd-7085-4b4d-ad10-a811e0b7b591", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"190545669", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
      I0308 09:08:54.807157       7 event.go:282] Event(v1.ObjectReference{Kind:"Ingress", Namespace:"lbz-cloud", Name:"gogs-proxy", UID:"1d283025-8008-46d5-89ff-bc1f7bdb3124", APIVersion:"networking.k8s.io/v1beta1", ResourceVersion:"190545670", FieldPath:""}): type: 'Normal' reason: 'Sync' Scheduled for sync
      I0308 09:08:54.904245       7 nginx.go:296] "Starting NGINX process"
      I0308 09:08:54.904349       7 leaderelection.go:243] attempting to acquire leader lease kubesphere-controls-system/ingress-controller-leader-kubesphere-router-lbz-cloud-nginx...
      I0308 09:08:54.904709       7 controller.go:148] "Configuration changes detected, backend reload required"
      I0308 09:08:54.957689       7 controller.go:165] "Backend successfully reloaded"
      I0308 09:08:54.957736       7 controller.go:176] "Initial sync, sleeping for 1 second"
      I0308 09:08:54.957796       7 event.go:282] Event(v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}): type: 'Normal' reason: 'RELOAD' NGINX reload triggered due to a change in configuration
      E0308 09:08:54.957763       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      I0308 09:08:54.988894       7 leaderelection.go:253] successfully acquired lease kubesphere-controls-system/ingress-controller-leader-kubesphere-router-lbz-cloud-nginx
      I0308 09:08:54.989207       7 status.go:84] "New leader elected" identity="kubesphere-router-lbz-cloud-667bb6d875-rrxcs"
      I0308 09:08:55.029475       7 status.go:204] "POD is not ready" pod="kubesphere-controls-system/kubesphere-router-lbz-cloud-667bb6d875-rrxcs" node="master"
      E0308 09:09:02.295397       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      E0308 09:09:12.295617       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      E0308 09:09:22.295731       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      E0308 09:09:32.295932       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      E0308 09:09:42.296099       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      I0308 09:09:48.506159       7 main.go:187] "Received SIGTERM, shutting down"
      I0308 09:09:48.506177       7 nginx.go:372] "Shutting down controller queues"
      I0308 09:09:48.509226       7 status.go:204] "POD is not ready" pod="kubesphere-controls-system/kubesphere-router-lbz-cloud-667bb6d875-rrxcs" node="master"
      I0308 09:09:48.513886       7 status.go:132] "removing value from ingress status" address=[]
      I0308 09:09:48.513915       7 nginx.go:388] "Stopping NGINX process"
      2022/03/08 09:09:48 [warn] 174#174: the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:143
      nginx: [warn] the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:143
      2022/03/08 09:09:48 [warn] 174#174: the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:144
      nginx: [warn] the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /etc/nginx/nginx.conf:144
      2022/03/08 09:09:48 [warn] 174#174: the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /etc/nginx/nginx.conf:145
      nginx: [warn] the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /etc/nginx/nginx.conf:145
      2022/03/08 09:09:48 [notice] 174#174: signal process started
      I0308 09:09:49.547422       7 nginx.go:401] "NGINX process has stopped"
      I0308 09:09:49.547436       7 main.go:195] "Handled quit, awaiting Pod deletion"
      E0308 09:09:52.296297       7 event.go:273] Unable to write event: '&v1.Event{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs.16da5cb260f192b6", GenerateName:"", Namespace:"kubesphere-controls-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, InvolvedObject:v1.ObjectReference{Kind:"Pod", Namespace:"kubesphere-controls-system", Name:"kubesphere-router-lbz-cloud-667bb6d875-rrxcs", UID:"402eec6a-79c6-4222-907c-29691927b491", APIVersion:"v1", ResourceVersion:"190562491", FieldPath:""}, Reason:"RELOAD", Message:"NGINX reload triggered due to a change in configuration", Source:v1.EventSource{Component:"nginx-ingress-controller", Host:""}, FirstTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, LastTimestamp:v1.Time{Time:time.Time{wall:0xc081e529b91596b6, ext:1640330002, loc:(*time.Location)(0x2686160)}}, Count:1, Type:"Normal", EventTime:v1.MicroTime{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, Series:(*v1.EventSeries)(nil), Action:"", Related:(*v1.ObjectReference)(nil), ReportingController:"", ReportingInstance:""}': 'can't create an event with namespace 'kubesphere-controls-system' in namespace 'lbz-cloud''(may retry after sleeping)
      • dami 回复了此帖

        dami 怎么升级的,做过哪些修改,改回原来的设置是否能够回复

        • dami 回复了此帖

          ruiyaoOps UI 上直接操作的,现在就像升级一下版本,看了github上,有讨论,不过要到下一个版本。想问下,你是如何升级到v1.1.0的,想先处理解决这个问题