How to find cluster node ip address

前端 未结 4 1600
庸人自扰
庸人自扰 2021-01-28 19:58

Minikube has the specific node ip address (192.168.99.100) for single cluster, if I using kubeadm to create many nodes cluster, what should I do to find this ip address?

4条回答
  •  死守一世寂寞
    2021-01-28 20:36

    Here's a command that should show the internal IP addresses of each node in the cluser:

    ubuntu@astrocyte:~$ kubectl get nodes -o yaml | grep -- "- address:"
        - address: 192.168.1.6
        - address: astrocyte
        - address: 192.168.1.20
        - address: axon2.local
        - address: 192.168.1.7
        - address: axon3.local
    

    It also shows hostnames, if you have them configured

提交回复
热议问题