设置Helm cli导致致命的“错误:远程错误:tls:错误的证书”

时间:2019-01-31 20:06:38

标签: ibm-cloud-private

我正在遵循https://github.com/rpsene/icp-scripts/blob/master/icp-310-single-node.sh使用docker安装ICP的CE版本。但得到的下面的错误

TASK [tiller : Deploying Tiller] ***********************************************
changed: [localhost]

TASK [tiller : Waiting for Tiller to start] ************************************
changed: [localhost]

TASK [helm-config : Setting up Helm cli] ***************************************
FAILED - RETRYING: Setting up Helm cli (10 retries left).
FAILED - RETRYING: Setting up Helm cli (9 retries left).
FAILED - RETRYING: Setting up Helm cli (8 retries left).
FAILED - RETRYING: Setting up Helm cli (7 retries left).
FAILED - RETRYING: Setting up Helm cli (6 retries left).
FAILED - RETRYING: Setting up Helm cli (5 retries left).
FAILED - RETRYING: Setting up Helm cli (4 retries left).
FAILED - RETRYING: Setting up Helm cli (3 retries left).
FAILED - RETRYING: Setting up Helm cli (2 retries left).
FAILED - RETRYING: Setting up Helm cli (1 retries left).
fatal: [localhost]: FAILED! => changed=true
  attempts: 10
  cmd: |-
    helm init --client-only --skip-refresh
     export HELM_HOME=~/.helm
     cp /installer/cluster/cfc-certs/helm/admin.crt $HELM_HOME/cert.pem
     cp /installer/cluster/cfc-certs/helm/admin.key $HELM_HOME/key.pem
     kubectl -n kube-system get pods -l app=helm,name=tiller
     helm list --tls
  delta: '0:00:02.447326'
  end: '2019-01-31 19:36:02.072940'
  msg: non-zero return code
  rc: 1
  start: '2019-01-31 19:35:59.625614'
  stderr: 'Error: remote error: tls: bad certificate'
  stderr_lines: <omitted>
  stdout: |-
    $HELM_HOME has been configured at /root/.helm.
    Not installing Tiller due to 'client-only' flag having been set
    Happy Helming!
    NAME                             READY     STATUS    RESTARTS   AGE
    tiller-deploy-546cd68bcb-b8wkw   1/1       Running   1          5h
  stdout_lines: <omitted>

PLAY RECAP *********************************************************************
192.168.17.131             : ok=159  changed=87   unreachable=0    failed=0
localhost                  : ok=75   changed=40   unreachable=0    failed=1

Playbook run took 0 days, 0 hours, 10 minutes, 10 seconds

3 个答案:

答案 0 :(得分:1)

许多人都需要通过重新启动tiller-deploy来升级它。

# use following command to check whether the tiller-deploy pod is running or not
$kubectl get pod -n kube-system

# delete tiller-deploy deployment
$kubectl delete deployment -n kube-system tiller-deploy

# use the same command to confirm that the tiller-deploy is deleted
$kubectl get pod -n kube-system

# use the command below to deploy tiller-deploy again
$helm init

答案 1 :(得分:0)

谢谢Richard的回答。从您的答案中瞥见并进行研究。发现证书生成器已过时,只是对其进行了更新,因此请确保它已安装且没有错误。

答案 2 :(得分:0)

在gitlab上重新安装kubernetes集成后,收到此错误。

kubernetes集成页面上的错误是:“安装GitLab Runner时出了点问题。操作失败。请检查pod日志中的安装运行程序以获取更多详细信息。”

事实证明,gitlab在删除kubernetes集成后未正确删除Google云控制台上的任何部署/吊舱。

要获取pod日志:

kubectl -n gitlab-managed-apps get pods
kubectl -n gitlab-managed-apps logs [pod-name]

要解决此问题:

首先在gitlab上删除您的kubernetes集成。然后删除gitlab-managed-apps工作区。

gcloud config set project [project-id]
kubectl delete namespace gitlab-managed-apps

最后,重新添加kubernetes集成。

玩得开心。