简体   繁体   English

“错误:转发端口:需要升级请求” kubernetes集群的掌舵错误

[英]“Error: forwarding ports: Upgrade request required” Error in helm of a kubernetes cluster

I have a kubernetes cluster built using kubespray and imported to Rancher. 我有一个使用kubespray并导入到Rancher的kubernetes集群。

The nodes are configured with 节点配置有

  • CentOS Linux 7 3.10.0-957.12.1.el7.x86_64 CentOS Linux 7 3.10.0-957.12.1.el7.x86_64
  • Docker version : 18.9.5 Docker版本:18.9.5
  • Kubelet version : v1.14.1 Kubelet版本:v1.14.1
  • Tiller version : v2.14.1 ( got this version from the tiller pod's image gcr.io/kubernetes-helm/tiller:v2.14.1 ) 分iller版本:v2.14.1(从分er荚的映像gcr.io/kubernetes-helm/tiller:v2.14.1获得了此版本)

All the tiller resources are working fine: 所有分till资源都可以正常工作:

$ kubectl get all -n kube-system | findstr tiller

pod/tiller-deploy-57ff77d846-frtb7             1/1       Running   0          12d

service/tiller-deploy          ClusterIP   10.233.49.112   <none>        44134/TCP                16d

deployment.apps/tiller-deploy             1         1         1            1           16d

replicaset.apps/tiller-deploy-57ff77d846             1         1         1         12d
replicaset.apps/tiller-deploy-69d5cd79bb             0         0         0         16d

But when I run the helm commands, I am getting this error: 但是当我运行helm命令时,出现此错误:

$ helm version

Client: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}
Error: forwarding ports: error upgrading connection: Upgrade request required

$ helm ls

Error: forwarding ports: error upgrading connection: Upgrade request required

I tried: 我试过了:

  • The tiller version is 2.14.1. 分er版本为2.14.1。 So, upgraded the helm client to version 2.14.1 from 2.11.0. 因此,将helm客户端从2.11.0升级到了2.14.1版本。 But that doesn't solve the issue. 但这并不能解决问题。

Can someone help me to solve this error? 有人可以帮助我解决此错误吗?

Each time when you invoke Helm command a specific port on the host machine is proxied to the target tiller Pod port 44134 , that is a simply inherited kubectl port-forward command and you can even find Go package portforward.go used by Helm client to initiate connection to the server. 每次您调用Helm命令时,主机上的特定端口都会被代理到目标44134机Pod端口44134 ,这是一个简单继承的kubectl port-forward 命令 ,您甚至可以找到Helm客户端用来启动的Go软件包 portforward.go。与服务器的连接。 Therefore, issue that you are consulting here is mostly connected with port forwarding (tunneling) problem between Helm client and server parties. 因此,您在此处咨询的问题主要与Helm客户端和服务器方之间的端口转发(隧道)问题有关。

I would probably establish manual port-forward check: 我可能会建立手动端口转发检查:

kubectl -n kube-system port-forward <tiller-deploy-Pod> <some_port>:44134

and even verify whether tiller service is listening on 44134 port: 甚至验证分44134服务是否正在监听44134端口:

kubectl exec -it <tiller-deploy-Pod> -n kube-system -- ./tiller

Find more information about Helm implementation in the official documentation . 在官方文档中找到有关Helm实现的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM