首页 文章

helm:x509:由未知权限签名的证书

提问于
浏览
2

我正在使用Kubernetes,我最近更新了 kubeconfig 中使用的管理员证书 . 但是,在我这样做之后,所有 helm 命令都失败了:

Error: Get https://cluster.mysite.com/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: x509: certificate signed by unknown authority

kubectl 按预期工作:

$ kubectl get nodes
NAME                                           STATUS    ROLES     AGE       VERSION
ip-10-1-0-34.eu-central-1.compute.internal     Ready     master    42d       v1.7.10+coreos.0
ip-10-1-1-51.eu-central-1.compute.internal     Ready     master    42d       v1.7.10+coreos.0
ip-10-1-10-120.eu-central-1.compute.internal   Ready     <none>    42d       v1.7.10+coreos.0
ip-10-1-10-135.eu-central-1.compute.internal   Ready     <none>    27d       v1.7.10+coreos.0
ip-10-1-11-71.eu-central-1.compute.internal    Ready     <none>    42d       v1.7.10+coreos.0
ip-10-1-12-199.eu-central-1.compute.internal   Ready     <none>    8d        v1.7.10+coreos.0
ip-10-1-2-110.eu-central-1.compute.internal    Ready     master    42d       v1.7.10+coreos.0

至于我已经能够阅读, helm 应该使用与 kubectl 相同的证书,这让我好奇 kubectl 如何工作,但 helm 不?

这是一个 生产环境 集群,内部版本通过helm图表处理,因此必须解决这个问题 .

任何提示将不胜感激 .

1 回答

  • 3

    作为解决方法,您可以尝试禁用证书验证 . Helm使用kube配置文件(默认为 ~/.kube/config ) . 您可以为 cluster 部分添加 insecure-skip-tls-verify: true

    clusters:
    - cluster:
        server: https://cluster.mysite.com
        insecure-skip-tls-verify: true
      name: default
    

    你有没有尝试重新安装helm / tiller?

    kubectl delete deployment tiller-deploy --namespace kube-system
    helm init
    

    还要检查是否在群集配置中配置了无效证书 .

相关问题