kubesphere / ks-installer

Install KubeSphere on existing Kubernetes cluster
https://kubesphere.io
Apache License 2.0
524 stars 743 forks source link

mini 安裝,启用istio失败 #487

Open errorcode7 opened 4 years ago

errorcode7 commented 4 years ago
Task 'servicemesh' failed:
**********************************************************************************************
{
  "counter": 96, 
  "created": "2019-11-15T06:14:54.219702", 
  "end_line": 95, 
  "event": "runner_on_failed", 
  "event_data": {
    "event_loop": null, 
    "host": "localhost", 
    "ignore_errors": null, 
    "play": "localhost", 
    "play_pattern": "localhost", 
    "play_uuid": "fe61ca21-00ff-f643-6aaa-000000000005", 
    "playbook": "/kubesphere/playbooks/servicemesh.yaml", 
    "playbook_uuid": "d484800b-5b57-43d7-9f15-3430489d1335", 
    "remote_addr": "127.0.0.1", 
    "res": {
      "_ansible_no_log": false, 
      "attempts": 50, 
      "changed": true, 
      "cmd": "/usr/local/bin/kubectl -n istio-system get pod | grep istio-init-crd-12 | awk '{print $3}'", 
      "delta": "0:00:00.422536", 
      "end": "2019-11-15 06:14:54.194535", 
      "invocation": {
        "module_args": {
          "_raw_params": "/usr/local/bin/kubectl -n istio-system get pod | grep istio-init-crd-12 | awk '{print $3}'", 
          "_uses_shell": true, 
          "argv": null, 
          "chdir": null, 
          "creates": null, 
          "executable": null, 
          "removes": null, 
          "stdin": null, 
          "stdin_add_newline": true, 
          "strip_empty_ends": true, 
          "warn": true
        }
      }, 
      "rc": 0, 
      "start": "2019-11-15 06:14:53.771999", 
      "stderr": "", 
      "stderr_lines": [], 
      "stdout": "", 
      "stdout_lines": []
    }, 
    "role": "ks-istio", 
    "task": "istio | Waiting for istio-init-crd-12", 
    "task_action": "command", 
    "task_args": "", 
    "task_path": "/kubesphere/installer/roles/ks-istio/tasks/main.yaml:58", 
    "task_uuid": "fe61ca21-00ff-f643-6aaa-00000000001c", 
    "uuid": "60bb6dd8-c534-4b87-9b1c-09148c522069"
  }, 
  "parent_uuid": "fe61ca21-00ff-f643-6aaa-00000000001c", 
  "pid": 3381, 
  "runner_ident": "servicemesh", 
  "start_line": 94, 
  "stdout": "fatal: [localhost]: FAILED! => {\"attempts\": 50, \"changed\": true, \"cmd\": \"/usr/local/bin/kubectl -n istio-system get pod | grep istio-init-crd-12 | awk '{print $3}'\", \"delta\": \"0:00:00.422536\", \"end\": \"2019-11-15 06:14:54.194535\", \"rc\": 0, \"start\": \"2019-11-15 06:14:53.771999\", \"stderr\": \"\", \"stderr_lines\": [], \"stdout\": \"\", \"stdout_lines\": []}", 
  "uuid": "60bb6dd8-c534-4b87-9b1c-09148c522069"
}

执行

kubectl get pod -n istio-system 

结果如下

NAME                            READY   STATUS      RESTARTS   AGE
istio-init-crd-10-1.3.3-8vmtm   0/1     Completed   0          27m
istio-init-crd-11-1.3.3-6szps   0/1     Completed   0          27m
errorcode7 commented 4 years ago

反复试了几次还是这样, istio-init-crd-12没有跑起来。

pixiake commented 4 years ago

先看看istio-init-crd-12这个job在不在,是不是执行失败了;helm list 看看istio-init正不正常,或者helm del --purge istio-init试试

errorcode7 commented 4 years ago
[root@master ~]# helm list
NAME                            REVISION    UPDATED                     STATUS      CHART                       APP VERSION                     NAMESPACE                
elasticsearch-logging           2           Fri Nov 15 13:58:57 2019    DEPLOYED    elasticsearch-1.22.1        6.7.0                           kubesphere-logging-system
elasticsearch-logging-curator   2           Fri Nov 15 13:58:58 2019    DEPLOYED    elasticsearch-curator-1.3.3 5.5.4                           kubesphere-logging-system
istio-init                      2           Fri Nov 15 13:59:45 2019    DEPLOYED    istio-init-1.3.2            1.3.2                           istio-system             
ks-jenkins                      3           Fri Nov 15 13:59:18 2019    DEPLOYED    jenkins-0.19.0              2.121.3                         kubesphere-devops-system 
ks-minio                        3           Fri Nov 15 13:57:51 2019    DEPLOYED    minio-2.5.16                RELEASE.2019-08-07T01-59-21Z    kubesphere-system        
ks-openldap                     5           Fri Nov 15 13:57:44 2019    DEPLOYED    openldap-ha-0.1.0           1.0                             kubesphere-system        
logging-fluentbit-operator      2           Fri Nov 15 13:58:56 2019    DEPLOYED    fluentbit-operator-0.1.0    0.1.0                           kubesphere-logging-system
metrics-server                  3           Fri Nov 15 13:58:52 2019    DEPLOYED    metrics-server-2.5.0        0.3.1                           kube-system              
uc                              3           Fri Nov 15 13:58:49 2019    DEPLOYED    jenkins-update-center-0.8.0 1.0                             kubesphere-devops-system 
[root@master ~]# kubectl describe  job istio-init-crd-12-1.3.3 -n istio-system
Name:           istio-init-crd-12-1.3.3
Namespace:      istio-system
Selector:       controller-uid=5411a849-460b-4899-b330-7548df837d92
Labels:         controller-uid=5411a849-460b-4899-b330-7548df837d92
                job-name=istio-init-crd-12-1.3.3
Annotations:    revisions:
                  {"1":{"status":"failed","reasons":["BackoffLimitExceeded"],"messages":["Job has reached the specified backoff limit"],"desire":1,"failed":...
Parallelism:    1
Completions:    1
Start Time:     Fri, 15 Nov 2019 13:48:55 +0800
Pods Statuses:  0 Running / 0 Succeeded / 1 Failed
Pod Template:
  Labels:           controller-uid=5411a849-460b-4899-b330-7548df837d92
                    job-name=istio-init-crd-12-1.3.3
  Annotations:      sidecar.istio.io/inject: false
  Service Account:  istio-init-service-account
  Containers:
   istio-init-crd-12:
    Image:      istio/kubectl:1.3.3
    Port:       <none>
    Host Port:  <none>
    Command:
      kubectl
      apply
      -f
      /etc/istio/crd-12/crd-12.yaml
    Environment:  <none>
    Mounts:
      /etc/istio/crd-12 from crd-12 (ro)
  Volumes:
   crd-12:
    Type:      ConfigMap (a volume populated by a ConfigMap)
    Name:      istio-crd-12
    Optional:  false
Events:        <none>
[root@master ~]# helm del --purge istio-init
release "istio-init" deleted
[root@master ~]# 
[root@master ~]# 
[root@master ~]# helm list
NAME                            REVISION    UPDATED                     STATUS      CHART                       APP VERSION                     NAMESPACE                
elasticsearch-logging           2           Fri Nov 15 13:58:57 2019    DEPLOYED    elasticsearch-1.22.1        6.7.0                           kubesphere-logging-system
elasticsearch-logging-curator   2           Fri Nov 15 13:58:58 2019    DEPLOYED    elasticsearch-curator-1.3.3 5.5.4                           kubesphere-logging-system
ks-jenkins                      3           Fri Nov 15 13:59:18 2019    DEPLOYED    jenkins-0.19.0              2.121.3                         kubesphere-devops-system 
ks-minio                        3           Fri Nov 15 13:57:51 2019    DEPLOYED    minio-2.5.16                RELEASE.2019-08-07T01-59-21Z    kubesphere-system        
ks-openldap                     5           Fri Nov 15 13:57:44 2019    DEPLOYED    openldap-ha-0.1.0           1.0                             kubesphere-system        
logging-fluentbit-operator      2           Fri Nov 15 13:58:56 2019    DEPLOYED    fluentbit-operator-0.1.0    0.1.0                           kubesphere-logging-system
metrics-server                  3           Fri Nov 15 13:58:52 2019    DEPLOYED    metrics-server-2.5.0        0.3.1                           kube-system              
uc                              3           Fri Nov 15 13:58:49 2019    DEPLOYED    jenkins-update-center-0.8.0 1.0                             kubesphere-devops-system 
[root@master ~]# kubectl get pod -n istio-system 
No resources found.
[root@master ~]# kubectl  get jobs.batch  -n  istio-system 
No resources found.

删除了,怎么再启动?

pixiake commented 4 years ago

修改下kubesphere-system下的ks-installer这个configmap会重新触发安装。

再安装的时候注意下istio-init-crd-12相关的pod,看看为啥会运行失败。

errorcode7 commented 4 years ago

可以了,不好意思,这么晚才回复。