【发布时间】:2020-07-24 03:15:35
【问题描述】:
我有这个配置文件
apiVersion: v1
clusters:
- cluster:
server: [REDACTED] // IP of my cluster
name: staging
contexts:
- context:
cluster: staging
user: ""
name: staging-api
current-context: staging-api
kind: Config
preferences: {}
users: []
我运行这个命令
kubectl config --kubeconfig=kube-config use-context staging-api
我收到这条消息
Switched to context "staging-api".
然后我跑
kubectl get pods
我收到了这条消息
The connection to the server localhost:8080 was refused - did you specify the right host or port?
据我所知,文档
https://kubernetes.io/docs/tasks/access-application-cluster/configure-access-multiple-clusters/
我做得对。我错过了什么吗?
【问题讨论】:
标签: kubernetes