Auto DHCP/DNS

rwanito

Member
May 25, 2021
14
0
6
25
Hello,

I'm trying to find solutions on this following need :
How can I deploy an VM/LXC with an automatic local IP (via DHCP?) and register this IP in a reverse proxy connected to the only public IP of the cluster.

So to sum up, I have a cluster of minimum of three servers.
Each time I deploy a VM or an LXC I want an automatic local IP (that it can accessed by the others from the cluster).
And from the hostname of my machine register the hostname.mydomain.com with the local IP.

Like that I'm free of static public IP or private IP and static DNS configuration. Like K8S can do.
And like that it's easier to have an automatic deployment !

I hope I've explained well !

Thanks for your work !
 
hi,
How can I deploy an VM/LXC with an automatic local IP (via DHCP?) and register this IP in a reverse proxy connected to the only public IP of the cluster.

So to sum up, I have a cluster of minimum of three servers.
Each time I deploy a VM or an LXC I want an automatic local IP (that it can accessed by the others from the cluster).
And from the hostname of my machine register the hostname.mydomain.com with the local IP.
you'll need to set up a DHCP server, for example you could create a simple LXC with isc-dhcp-server installed and configured on it to lease IP addresses from your local range.

for registering the new machines automatically to a reverse proxy i'm not aware of automatic solutions, you might have to write some scripts to do that yourself.
 
Super ! Thanks for your reply !
Okay, so basically, ansible via proxmoxer can achieve this !

Do you think I can have a local private network in the cluster. Or the private network can be only acceded by the local machines ?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!