[英]Kubectl command throwing error: Unable to connect to the server: getting credentials: exec: exit status 2
[英]kubectl exec command failing with: Upgrade request required
我已经在AWS上设置了Rancher k8s环境。
Rancher服务器位于具有ssl终止功能的经典ELB的后面,可以通过例如https://my.rancher.server
。
我已经通过运行通过命令行部署了一个简单的pod
kubectl create -f <podfilename.yml>
这样便可以get
并describe
该广告连播。
但是,以下命令失败:
$ kubectl exec my.pod.name -- ls /app
W1219 12:13:12.053543 16174 http.go:363] Error reading backend response: unexpected EOF
error: error sending request: Post https://my.rancher.server/r/projects/1a1043/kubernetes:6443/api/v1/namespaces/default/pods/my.pod.name/exec?command=ls&command=%2Fapp&container=k8s-demo&container=k8s-demo&stderr=true&stdout=true: unexpected EOF
编辑 :这是返回的json:
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {
},
"status": "Failure",
"message": "Upgrade request required",
"reason": "BadRequest",
"code": 400
}
我已经配置了elb以使用ssl侦听器,并且还配置了代理协议。
ELB的HTTP不支持websocket。 您需要使用SSL侦听器-> TCP后端并配置代理协议支持。 http://rancher.com/docs/rancher/v1.6/en/installing-rancher/installing-server/basic-ssl-config/#elb
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.