Using microk8s 1.18 on Ubuntu 20.04.
I’d like to get the external ip of the node. Similar to
minikube ip as shown in the Istio Ingress Gateways documentation.
Question: How to get the IP address of the node so to allow remote clients outside of the cluster to access services installed within the cluster? In my example, this address would be
192.168.1.98. Maybe it is possible to grep it from
However all I can see is the loopback IP
$ microk8s.kubectl cluster-info Kubernetes master is running at https://127.0.0.1:16443 Heapster is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/heapster/proxy CoreDNS is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy Grafana is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/monitoring-grafana/proxy InfluxDB is running at https://127.0.0.1:16443/api/v1/namespaces/kube-system/services/monitoring-influxdb:http/proxy
EDIT: Hum maybe I am asking the wrong question? A cluster theoritically has multiple nodes so it’s kind of illogical to ask the cluster to give a node IP address. Maybe I should query the node details and read the info in the
$ microk8s.kubectl describe node $(microk8s.kubectl get nodes --no-headers | cut -f 1 -d " ") // console output: Name: myhostname Roles: <none> ... etc ... Addresses: InternalIP: 192.168.1.98 Hostname: myhostname ... etc ...