我按照“ https://www.terraform.io/docs/providers/aws/guides/eks-getting-started.html ”使用terraform 创建了一个EKS 集群。
我能够成功创建配置映射,但无法获取节点详细信息 -
$ ./kubectl_1.10.3_darwin get nodes
No resources found.
服务详情——
$ ./kubectl_1.10.3_darwin get services
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.100.0.1 <none> 443/TCP 2h
Kubectl 登录节点 -
Aug 5 09:14:32 ip-172-31-18-205 kubelet: I0805 09:14:32.617738 25463 aws.go:1026] Building AWS cloudprovider
Aug 5 09:14:32 ip-172-31-18-205 kubelet: I0805 09:14:32.618168 25463 aws.go:988] Zone not specified in configuration file; querying AWS metadata service
Aug 5 09:14:32 ip-172-31-18-205 kubelet: E0805 09:14:32.794914 25463 tags.go:94] Tag "KubernetesCluster" nor "kubernetes.io/cluster/..." not found; Kubernetes may behave unexpectedly.
Aug 5 09:14:32 ip-172-31-18-205 kubelet: F0805 09:14:32.795622 25463 server.go:233] failed to run Kubelet: could not init cloud provider "aws": AWS cloud failed to find ClusterID
Aug 5 09:14:32 ip-172-31-18-205 systemd: kubelet.service: main process exited, code=exited, status=255/n/a
Aug 5 09:14:32 ip-172-31-18-205 systemd: Unit kubelet.service entered failed state.
Aug 5 09:14:32 ip-172-31-18-205 systemd: kubelet.service failed.
AWS 入门文档未提及任何标签相关信息“ https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html ”。
过了一会儿,我发现我错过了将“kubernetes.io/cluster/*”之类的资源标签放到我的网络资源中。
我的网络资源是预先创建的,我使用远程状态来获取所需的详细信息。我相信我可以向它添加标签或创建一个新的 VPC 环境。
有没有其他方法可以在不添加标签或配置新资源的情况下解决这个问题?