JonasProgrammer / JonasProgrammer/docker-machine-driver-hetzner

[Idea/Suggestion] Use private IP with rancher in different network

Open
#45 23 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement pinned
Dominant language
Go
Stars
438
Forks
58
PR merge metrics
No merged PRs in 30d

Description

Hi,

looking at the code and behaviour of the driver I have some suggestions that would in my opinion make it a little bit more user friendly.

What would be the end result?
When deploying a new cluster user can attach private network and select that he wants to use that network for inter-cluster communication (for etcd, controlplane, network overlay etc.). This would mean that in cloud-init user could simply setup firewall so it would allow all traffic on 10.0.0.0/8 and only expose port 22 ,80, 443 and 6443 to the outside world.

When setting up the node rancher would still ssh to the node via public IP.

How?

Based on the docs for Debian/Ubuntu the first private network interface will be attached at ens10, second at ens11 etc. RHEL distributions will use eth1, eth2, ...

When user selects he wants to use private IP this IP should only be used for nodes in that cluster - ssh should still be done via public IP. This would require changing the getSSHHostname to always return public IP - I think, unfortunately I don't have any experience with Go so I could be wrong here.

This should enable rancher to ssh into the machine via public IP and etc/control plane inside the new cluster to use the private IP.

To enforce all internal traffic goes via internal IP in the new Kubernetes cluster (i think this is part of the UI plugin) the cloud.yaml config should
replace

network:
    plugin: "canal"

with:

network:
    plugin: "canal"
    canal_network_provider:
        iface: "ens10"   # Based on the distro and user input? 

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in driver.go at getSSHHostname and inspect how node addresses and private network interfaces are currently handled. Review the proposed cloud.yaml canal_network_provider configuration and the Rancher integration points. Done would mean a selected private interface is used for cluster-internal traffic while SSH continues to use the public IP across the documented distributions.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go, kubernetes
Domain
cloud, infrastructure, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.