I have a fresh LXD cluster on version 3.13.
$ lxc cluster list
+-------------------+---------------------------+----------+--------+-------------------+
| NAME | URL | DATABASE | STATE | MESSAGE |
+-------------------+---------------------------+----------+--------+-------------------+
| codewerks-alpha | https://xxx.xxx.45.202:8443 | YES | ONLINE | fully operational |
+-------------------+---------------------------+----------+--------+-------------------+
| codewerks-baker | https://xxx.xxx.45.203:8443 | YES | ONLINE | fully operational |
+-------------------+---------------------------+----------+--------+-------------------+
| codewerks-charlie | https://xxx.xxx.45.204:8443 | YES | ONLINE | fully operational |
+-------------------+---------------------------+----------+--------+-------------------+
I create a container on the cluster and get this result:
$ lxc list
+------+---------+------+------+------------+-----------+-----------------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | LOCATION |
+------+---------+------+------+------------+-----------+-----------------+
| p1 | RUNNING | | | PERSISTENT | | codewerks-baker |
+------+---------+------+------+------------+-----------+-----------------+
The container doesn’t receive an IPv4 address.
$ lxc network list
+---------+----------+---------+-------------+---------+---------+
| NAME | TYPE | MANAGED | DESCRIPTION | USED BY | STATE |
+---------+----------+---------+-------------+---------+---------+
| enp2s0 | physical | NO | | 0 | |
+---------+----------+---------+-------------+---------+---------+
| lxdfan0 | bridge | YES | | 1 | CREATED |
+---------+----------+---------+-------------+---------+---------+
I noted this answer from Stéphane about clustering assuming “an existing layer 2 infrastructure”. (LXD cluster network question) I don’t understand that, but what I’d like is to have LXD provide dhcp service, assigning these containers an IP address and allowing them to access the internet.
Is there a way to configure my cluster to use a DHCP server for its containers?