Link

Unifi Network Controller

UniFi

Table of contents

  1. UniFi Static Host Mapping

UniFi Static Host Mapping

On the UniFi Controller:

  1. Create a dedicated VLAN with its own IP range.
  2. Set a static IP address for each cluster node.
  3. Create a host entry for each k3s node, using the static IP set above.

/var/lib/unifi/sites/${SITE_ID}/config.gateway.json:

{
    "system": {
        "static-host-mapping": {
            "host-name": {
                "server-0.k3s": {
                    "alias": [
                        "server-0"
                    ],
                    "inet": [
                        "192.168.111.200"
                    ]
                },
                "agent-1.k3s": {
                    "alias": [
                        "agent-0"
                    ],
                    "inet": [
                        "192.168.111.201"
                    ]
                },
                "agent-2.k3s": {
                    "alias": [
                        "agent-0"
                    ],
                    "inet": [
                        "192.168.111.202"
                    ]
                },
                "agent-3.k3s": {
                    "alias": [
                        "agent-1"
                    ],
                    "inet": [
                        "192.168.111.203"
                    ]
                }
            }
        }
    }
}