脚本执行提示成功,但是页面一直显示是2.1.0
查看日志显示

TASK [metrics-server : Metrics-Server | Installing metrics-server] *************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/helm upgrade --install metrics-server /etc/kubesphere/metrics-server  --namespace kube-system\n", "delta": "0:00:00.478175", "end": "2020-08-03 20:12:02.953711", "msg": "non-zero return code", "rc": 1, "start": "2020-08-03 20:12:02.475536", "stderr": "Error: UPGRADE FAILED: \"metrics-server\" has no deployed releases", "stderr_lines": ["Error: UPGRADE FAILED: \"metrics-server\" has no deployed releases"], "stdout": "", "stdout_lines": []}
...ignoring

TASK [metrics-server : Metrics-Server | Installing metrics-server retry] *******
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "/usr/local/bin/helm del --purge metrics-server && sleep 5 && /usr/local/bin/helm upgrade --install metrics-server /etc/kubesphere/metrics-server --namespace kube-system\n", "delta": "0:00:06.805413", "end": "2020-08-03 20:12:09.910715", "msg": "non-zero return code", "rc": 1, "start": "2020-08-03 20:12:03.105302", "stderr": "Error: release metrics-server failed: deployments.apps \"metrics-server\" already exists", "stderr_lines": ["Error: release metrics-server failed: deployments.apps \"metrics-server\" already exists"], "stdout": "release \"metrics-server\" deleted\nRelease \"metrics-server\" does not exist. Installing it now.", "stdout_lines": ["release \"metrics-server\" deleted", "Release \"metrics-server\" does not exist. Installing it now."]}

PLAY RECAP *********************************************************************
localhost                  : ok=7    changed=4    unreachable=0    failed=1    skipped=4    rescued=0    ignored=1   

请问这个怎么解决啊?

现在还有另一个问题,在项目里创建网关时报错
the server could not find the requested resource

请大佬指点迷津

    14 天 后

    hetao kubectl get apiservice 看看有没有 metrics 相关的 apiservice, 如果状态正常的话说明集群中已经安装了metrics-server,需要在cc中关闭metrics-server,ks-installer会继续安装流程

      hongming

      # kubectl get apiservice
      NAME                                   SERVICE   AVAILABLE   AGE
      v1.                                    Local     True        239d
      v1.admissionregistration.k8s.io        Local     True        29d
      v1.apiextensions.k8s.io                Local     True        29d
      v1.apps                                Local     True        239d
      v1.authentication.k8s.io               Local     True        239d
      v1.authorization.k8s.io                Local     True        239d
      v1.autoscaling                         Local     True        239d
      v1.batch                               Local     True        239d
      v1.coordination.k8s.io                 Local     True        239d
      v1.jaegertracing.io                    Local     True        29d
      v1.monitoring.coreos.com               Local     True        29d
      v1.networking.k8s.io                   Local     True        239d
      v1.rbac.authorization.k8s.io           Local     True        239d
      v1.scheduling.k8s.io                   Local     True        239d
      v1.storage.k8s.io                      Local     True        239d
      v1alpha1.authentication.istio.io       Local     True        29d
      v1alpha1.devops.kubesphere.io          Local     True        29d
      v1alpha1.logging.kubesphere.io         Local     True        29d
      v1alpha1.openebs.io                    Local     True        29d
      v1alpha1.rbac.istio.io                 Local     True        29d
      v1alpha1.tenant.kubesphere.io          Local     True        125d
      v1alpha2.config.istio.io               Local     True        29d
      v1alpha2.servicemesh.kubesphere.io     Local     True        125d
      v1alpha3.networking.istio.io           Local     True        125d
      v1beta1.admissionregistration.k8s.io   Local     True        239d
      v1beta1.apiextensions.k8s.io           Local     True        239d
      v1beta1.app.k8s.io                     Local     True        29d
      v1beta1.authentication.k8s.io          Local     True        239d
      v1beta1.authorization.k8s.io           Local     True        239d
      v1beta1.batch                          Local     True        239d
      v1beta1.certificates.k8s.io            Local     True        239d
      v1beta1.coordination.k8s.io            Local     True        239d
      v1beta1.events.k8s.io                  Local     True        239d
      v1beta1.extensions                     Local     True        239d
      v1beta1.networking.k8s.io              Local     True        239d
      v1beta1.node.k8s.io                    Local     True        239d
      v1beta1.policy                         Local     True        239d
      v1beta1.rbac.authorization.k8s.io      Local     True        239d
      v1beta1.scheduling.k8s.io              Local     True        239d
      v1beta1.storage.k8s.io                 Local     True        239d
      v2beta1.autoscaling                    Local     True        239d
      v2beta2.autoscaling                    Local     True        239d

        hetao

        helm list -n kube-system
        kubectl get deploy,svc -n kube-system 

        把metrics-server相关的删掉,然后重启ks-installer

          Cauchy

          # /usr/local/bin/helm list 
          NAME                            REVISION        UPDATED                         STATUS          CHART                           APP VERSION                     NAMESPACE                
          elasticsearch-logging           3               Thu Jun 18 17:03:43 2020        DEPLOYED        elasticsearch-1.22.1            6.7.0                           kubesphere-logging-system
          elasticsearch-logging-curator   3               Thu Jun 18 17:03:44 2020        DEPLOYED        elasticsearch-curator-1.3.3     5.5.4                           kubesphere-logging-system
          istio                           2               Mon Apr 20 18:08:52 2020        DEPLOYED        istio-1.3.3                     1.3.3                           istio-system             
          istio-init                      4               Mon Aug  3 19:58:07 2020        DEPLOYED        istio-init-1.3.2                1.3.2                           istio-system             
          jaeger-operator                 2               Mon Apr 20 18:09:21 2020        DEPLOYED        jaeger-operator-2.9.0           1.13.1                          istio-system             
          ks-jenkins                      3               Thu Jun 18 17:34:16 2020        DEPLOYED        jenkins-0.19.0                  2.121.3                         kubesphere-devops-system 
          ks-minio                        4               Mon Aug  3 19:40:27 2020        DEPLOYED        minio-2.5.16                    RELEASE.2019-08-07T01-59-21Z    kubesphere-system        
          ks-openldap                     4               Mon Aug  3 19:40:17 2020        DEPLOYED        openldap-ha-0.1.0               1.0                             kubesphere-system        
          ks-sonarqube                    3               Mon Aug  3 19:58:31 2020        DEPLOYED        sonarqube-0.13.5                7.6                             kubesphere-devops-system 
          logging-fluentbit-operator      4               Mon Aug  3 19:54:29 2020        DEPLOYED        fluentbit-operator-0.1.0        0.1.0                           kubesphere-logging-system
          nfs-client                      7               Wed Sep  2 10:49:56 2020        DEPLOYED        nfs-client-provisioner-1.1.2    3.1.0                           kube-system              
          rabbitm-hc4x9s                  1               Mon May 18 11:13:44 2020        DEPLOYED        rabbitmq-0.1.2                  3.8.1                           gdpicc                   
          uc                              5               Mon Aug  3 19:57:41 2020        DEPLOYED        jenkins-update-center-0.8.0     1.0                             kubesphere-devops-system 
          # kubectl get deploy,svc -n kube-system 
          NAME                                                READY   UP-TO-DATE   AVAILABLE   AGE
          deployment.apps/calico-kube-controllers             1/1     1            1           239d
          deployment.apps/coredns                             1/1     1            1           29d
          deployment.apps/dns-autoscaler                      1/1     1            1           239d
          deployment.apps/nfs-client-nfs-client-provisioner   1/1     1            1           239d
          deployment.apps/openebs-localpv-provisioner         1/1     1            1           239d
          deployment.apps/openebs-ndm-operator                1/1     1            1           239d
          deployment.apps/tiller-deploy                       1/1     1            1           239d
          
          NAME                                       TYPE        CLUSTER-IP     EXTERNAL-IP   PORT(S)                  AGE
          service/coredns                            ClusterIP   10.233.0.3     <none>        53/UDP,53/TCP,9153/TCP   239d
          service/etcd                               ClusterIP   None           <none>        2379/TCP                 239d
          service/kube-controller-manager-headless   ClusterIP   None           <none>        10252/TCP                239d
          service/kube-scheduler-headless            ClusterIP   None           <none>        10251/TCP                239d
          service/kubelet                            ClusterIP   None           <none>        10250/TCP                239d
          service/tiller-deploy                      ClusterIP   10.233.50.39   <none>        44134/TCP                239d

          其它namespace下有木有装过metrics-server,没有的话重启下ks-installer

            Cauchy
            重启ks-installer后metrics-server有了,系统也升级到2.1.1了,感谢大神的指导!

            hetao 更改标题为「【已解决】2.1.0升级2.1.1失败,创建网关也报错