从 VS Code 到 Kubernetes 的连接失败

Connection from VS Code to Kubernetes failing

我在尝试从我的 Azure Kubernetes 集群的 VS Code 访问详细信息时收到一条错误消息。这个问题阻止我将调试器附加到 pod。

我收到以下错误消息:

Error loading document: Error: cannot open k8smsx://loadkubernetescore/pod-kube-system%20%20%20coredns-748cdb7bf4-q9f9x.yaml?ns%3Dall%26value%3Dpod%2Fkube-system%20%20%20coredns-748cdb7bf4-q9f9x%26_%3D1611398456559. Detail: Unable to read file 'k8smsx://loadkubernetescore/pod-kube-system   coredns-748cdb7bf4-q9f9x.yaml?ns=all&value=pod/kube-system   coredns-748cdb7bf4-q9f9x&_=1611398456559' (Get command failed: error: there is no need to specify a resource type as a separate argument when passing arguments in resource/name form (e.g. 'kubectl get resource/<resource_name>' instead of 'kubectl get resource resource/<resource_name>'
)

我的设置

我试过的

我可以进一步尝试的任何想法/提示?

谢谢

正如@mdaniel 所写:节点视图仅供人类使用,您实际想要单击的树项目位于命名空间 / kube-system / coredns-748cdb7bf4-q9f9x 下方。试一试,并考虑报告您的糟糕体验 to their issue tracker,因为 1.2.2 版似乎是 2 天前刚刚发布的,可能还没有经过很好的测试。

最终解决方案是以其他方式附加调试器 - 通过工作负载/部署。