简体   繁体   English

kubectl无法访问远程集群

[英]kubectl unable to access remote cluster

I have a remote cluster with several nodes. 我有一个带有几个节点的远程集群。 I'd like to control it remotely from my laptop. 我想从笔记本电脑远程控制它。 So here is what I did: 所以这就是我所做的:

  1. scp root@remote-master:/root/.kube/config foo
  2. change it so that the host name (let's say it's foo as well) for the master node is used 更改它,以便使用主节点的主机名(也称为foo
  3. kubectl --kubeconfig foo get node

it returns: 它返回:

No resources found.
Error from server (NotAcceptable): unknown (get nodes)

I've already checked that the ca.crt file is created with domain foo and foo is resolvable locally on my laptop. 我已经检查过ca.crt文件是使用域foo创建的,并且foo在我的笔记本电脑上可以本地解析。

What am I missing? 我想念什么?

您的kubectl版本与Kubernetes版本不兼容。

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

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