1

When using kubelet kubeconfig, only the worker node is displayed but the master node is not displayed, Like the following output on the aws eks worker node:

kubectl  get node --kubeconfig /var/lib/kubelet/kubeconfig
NAME                                          STATUS     ROLES    AGE    VERSION
ip-172-31-12-2.ap-east-1.compute.internal     Ready   <none>   30m    v1.18.9-eks-d1db3c
ip-172-31-42-138.ap-east-1.compute.internal   Ready      <none>   4m7s   v1.18.9-eks-d1db3c

For some reasons, I need to hide the information of other worker and master nodes, and only display the information of the worker node where the kubectl command is currently executed.

what should i do ?

I really appreciate your help.

dream
  • 51
  • 1
  • 1
  • 4
  • Hello. Can you tell more about your use case? There could be a better way to achieve what you're describing. Answering one of your concerns in the question: Master node is excluded from the list because `EKS` is a provider-managed solution, and users don't have access to Kubernetes control-plain there. – Dawid Kruk Dec 24 '20 at 13:23
  • I usually run `kubectl` from my desktop system; I don't have direct-login access to any of the nodes at all. What should `kubectl get nodes` show then? – David Maze Dec 24 '20 at 13:23

0 Answers0