gpt4 book ai didi

kubernetes - 在 VSTS 中创建 Kubernetes Endpoint 会产生错误

转载 作者:行者123 更新时间:2023-12-01 04:39:13 28 4
gpt4 key购买 nike

什么设置新的 Kubernetes 端点并单击“验证连接”错误消息:
“Kubconfig 不包含用户字段。请检查 kubeconfig。” - 始终显示。

尝试了多种输出配置文件的方法都无济于事。我还从网上复制并粘贴了许多示例配置文件,但最终都遇到了同样的问题。有人成功创建了新端​​点吗?

最佳答案

接下来是 TsuyoshiUshio/KubernetesTask issue 35

I try to reproduce, however, I can't do it.
I'm not sure, however, I can guess it might the mismatch of the version of the cluster/kubectl which you download by the download task/kubeconfig.
Workaround might be like this:

  • kubectl version in your local machine and check the current server/client version
  • specify the same version as the server on the download task. (by default it is 1.5.2)
  • See the log of your release pipeline which is fail, you can see which kubectl command has been executed, do the same thing on your local machine with fitting your local pc's environment.

The point is, before go to the VSTS, download the kubectl by yourself.
Then, put the kubeconfg on the default folder like ~/.kube/config or set environment variables KUBECONFIG to the binary.
Then execute kubectl get nodes and make sure if it works.

My kubeconfig is different format with yours. If you use AKS, az aks install-cli command and az aks get-credentials command.
Please refer https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough .

If it works locally, the config file must work on the VSTS task environment. (or this task or VSTS has a bug)

关于kubernetes - 在 VSTS 中创建 Kubernetes Endpoint 会产生错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51106010/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com