在Ubuntu上的自托管gitlab上安装kubectl时出错

时间:2019-01-02 10:35:02

标签: kubernetes gitlab kubectl

我已经在Ubuntu 16.04机器上安装了Gitlab。 Gitlab工作正常。 现在,我正在尝试在同一台计算机上安装kubectl。但是在命令上出现了问题:

Socket.ReceiveAsync

$ kubectl cluster-info dump

1 个答案:

答案 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>