Digital Ocean how to use private network to avoid bandwidth charges?

I installer rancher on a Digital Ocean droplet and created a Digital Ocean cluster with 3 nodes. All have private networking enabled and have a private and public IP.

After looking at the bandwidth graphs in Digital Ocean it seems all the communication between the nodes and also between the nodes an rancher server is being done using the public IP address instead of the private network.

According to Digital Ocean in a few days I have used 833GB of public bandwidth so will probably use several TB of public bandwidth each month.

Is there any way to use the private network instead for communication between the nodes and also for communication with the rancher server?

2 Likes

Have you tried to set internal_address in your rancher-cluster.yml when you installed Rancher with RKE?

nodes:
- address: 10.0.0.1
  internal_address: 10.15.0.150
  [...]

It is not for RKE. Rancher cluster that host the Rancher is set using RKE and it use the defined internal IPs. When you create a new cluster from Rancher GUI using the Digital Ocean node driver it places external-ip two times in the annotation of nodes:

"annotations" : {
   "rke.cattle.io/internal-ip" : "188.XXX.YY.232",
   "projectcalico.org/IPv4Address" : "10.133.106.89/16",
   "rke.cattle.io/external-ip" : "188.XXX.YY.232",
   "volumes.kubernetes.io/controller-managed-attach-detach" : "true",
   "node.alpha.kubernetes.io/ttl" : "0"
},

Nodes have private networking (there is a check box in the template for it) but do not use it
So the only way that I see is to use custom cluster or create the cluster using other tools and import it.
I still investigate what Rancher can give me. I think it will be great if it use internal networking and give me the easiness to scale my cluster with a click or API, but as rubenmch explain at the moment we both have a problem with it using only the external IP.