I have 3 compute engines (VMs) from a cloud provider, and I can connect to them using my SSH key and their public IP.
I want to run a Kubernetes cluster (1 master, 2 workers) using kubelet on these machines, and the question arises when I want to address the nodes.
Each machine has a VPC IP in 192.168.x.x and a public one in 183.x.x.x; when advertising the master node and joining workers, which IP should I use?
for example, on the master node, I need to advertise the master node IP using this command:
kubeadm init --apiserver-advertise-address=[Master Node IP] --pod-network-cidr=10.15.0.1/16
Considering that these VMs are connected through VPC private IPs, is it recommended to use public IPs for advertising the master node and joining worker nodes?