头盔列表尝试连接到localhost而不是Kubernetes

Dhe*_*shi 6 kubernetes kubernetes-helm

我有一个Kubernetes集群正在运行.所有pod都在运行.这是一台带有迷你插孔的Windows机器.

但是helm ls --debug会出现以下错误

helm ls --debug
[debug] Created tunnel using local port: '57209'

[debug] SERVER: "127.0.0.1:57209"

Error: Get http://localhost:8080/api/v1/namespaces/kube-system/configmaps?labelSelector=OWNER%!D(MISSING)TILLER: dial tcp 127.0.0.1:8080: connect: connection refused
Run Code Online (Sandbox Code Playgroud)

群集信息

kubectl.exe cluster-info
Kubernetes master is running at https://135.250.128.98:8443

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Run Code Online (Sandbox Code Playgroud)

kubectl服务

kubectl.exe get svc
NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.96.0.1    <none>        443/TCP   3h
Run Code Online (Sandbox Code Playgroud)

仪表板可在以下访问 http://135.250.128.98:30000

kube配置:

apiVersion: v1
clusters:
- cluster:
    certificate-authority: C:\Users\abc\.minikube\ca.crt
    server: https://135.250.128.98:8443
  name: minikube
contexts:
- context:
    cluster: minikube
    user: minikube
  name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
  user:
    as-user-extra: {}
    client-certificate: C:\Users\abc\.minikube\client.crt
    client-key: C:\Users\abc\.minikube\client.key
Run Code Online (Sandbox Code Playgroud)

有解决方案吗?大多数在线资源表示群集配置错误.但不确定什么是错误配置以及如何解决此错误?

Reb*_*aia 9

什么工作对我来说,当我面临着同样的问题发生了变化automountServiceAccountTokentrue.

使用以下命令编辑tiller-deploy

kubectl --namespace=kube-system edit deployment/tiller-deploy
Run Code Online (Sandbox Code Playgroud)

automountServiceAccountToken改为true

  • 以非交互方式应用此补丁,这对我有用:`kubectl patch deploy --namespace kube-system tiller-deploy -p'{"spec":{"template":{"spec":{"automountServiceAccountToken":true }}}}'` (3认同)