我已经在Ubuntu 16.04机器上安装了Gitlab。 Gitlab工作正常。 现在,我正在尝试在同一台计算机上安装kubectl。但是在命令上出现了问题:
Socket.ReceiveAsync
$ kubectl cluster-info dump
答案 0 :(得分:1)
好像kubectl
正在与您kube-apiserver
以外的其他人交谈。确保您的~/.kube/config
文件看起来像这样,并指向右边的kube-apiserver
:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: <REDACTED>
server: https://10.10.10.1:6443 <== This needs to point to the right kube-apiserver address
name: kubernetes
contexts:
- context:
cluster: kubernetes
namespace: default
user: kubernetes-admin
name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
user:
client-certificate-data: <REDACTED>
client-key-data: <REDACTED>