Ani*_*hak 5 kubernetes spinnaker kubectl
我正在尝试在多节点上部署大三角帆。我有 2 个虚拟机:第一个带有 halyard 和 kubectl,第二个包含 kubernetes master api。我的 kubectl 配置良好,能够与远程 kubernetes api 通信,
“kubectl get namespaces” 有效
kubectl get namespaces
NAME STATUS AGE
default Active 16d
kube-public Active 16d
kube-system Active 16d
Run Code Online (Sandbox Code Playgroud)
但是当我运行这个 cmd
hal config provider -d kubernetes account add spin-kubernetes --docker-registries myregistry
I get this error
Add the spin-kubernetes account
Failure
Problems in default.provider.kubernetes.spin-kubernetes:
- WARNING You have not specified a Kubernetes context in your
halconfig, Spinnaker will use "default-system" instead.
? We recommend explicitly setting a context in your halconfig, to
ensure changes to your kubeconfig won't break your deployment.
? Options include:
- default-system
! ERROR Unable to communicate with your Kubernetes cluster:
Operation: [list] for kind: [Namespace] with name: [null] in namespace:
[null] failed..
? Unable to authenticate with your Kubernetes cluster. Try using
kubectl to verify your credentials.
- Failed to add account spin-kubernetes for provider
kubernetes.
Run Code Online (Sandbox Code Playgroud)
从错误消息来看,似乎有两种方法可以解决此问题,将 halconfig 设置为与默认系统上下文通信,以便它可以与您的集群通信,或者反之亦然,即配置您的上下文。
尝试这个:
kubectl config view
Run Code Online (Sandbox Code Playgroud)
我想您会看到那里的上下文和当前上下文是默认系统,请尝试更改它们。如需更多帮助,请执行以下操作:
kubectl config --help
Run Code Online (Sandbox Code Playgroud)
我猜您正在寻找 set-context 选项。希望有帮助。
| 归档时间: |
|
| 查看次数: |
1847 次 |
| 最近记录: |