diff --git a/public/docs-static/img/how-to-guides/add-setup-key.png b/public/docs-static/img/how-to-guides/add-setup-key.png index 2e35be03..79dae790 100644 Binary files a/public/docs-static/img/how-to-guides/add-setup-key.png and b/public/docs-static/img/how-to-guides/add-setup-key.png differ diff --git a/src/pages/how-to/cli.mdx b/src/pages/how-to/cli.mdx index dd5e2a36..76118c08 100644 --- a/src/pages/how-to/cli.mdx +++ b/src/pages/how-to/cli.mdx @@ -60,6 +60,7 @@ The command will check if the peer is logged in and connect to the management se --dns-resolver-address string Sets a custom address for NetBird's local DNS resolver. If set, the agent won't attempt to discover the best ip and port to listen on. An empty string "" clears the previous configuration. E.g. --dns-resolver-address 127.0.0.1:5053 or --dns-resolver-address "" --enable-rosenpass [Experimental] Enable Rosenpass feature. If enabled, the connection will be post-quantum secured via Rosenpass. --external-ip-map strings Sets external IPs maps between local addresses and interfaces.You can specify a comma-separated list with a single IP and IP/IP or IP/Interface Name. An empty string "" clears the previous configuration. E.g. --external-ip-map 12.34.56.78/10.0.0.1 or --external-ip-map 12.34.56.200,12.34.56.78/10.0.0.1,12.34.56.80/eth1 or --external-ip-map "" + --extra-dns-labels strings Sets DNS labels. You can specify a comma-separated list of up to 32 labels. An empty string "" clears the previous configuration. E.g. --extra-dns-labels vpc1 or --extra-dns-labels vpc1,mgmt1 or --extra-dns-labels "" -F, --foreground-mode start service in foreground -h, --help help for up --interface-name string Wireguard interface name (default "utun100") @@ -86,6 +87,14 @@ In case you need to use a setup key, use the `--setup-key` flag : ```shell netbird up --setup-key AAAA-BBB-CCC-DDDDDD ``` +You can set extra DNS labels with the `--extra-dns-labels` flag: +```shell +netbird up --setup-key AAAA-BBB-CCC-DDDDDD --extra-dns-labels vpc1,mgmt1 +``` + + This feature requires a setup-key with permissions to add peers with the extra labels. + +Multiple peers with the same extra labels will generate grouped DNS labels on the client side, and this feature can be used for DNS round-robing load balancing. ### login Command to authenticate the NetBird client to a management service. If the peer is not logged in, by default, it will attempt to initiate an SSO login flow. diff --git a/src/pages/how-to/register-machines-using-setup-keys.mdx b/src/pages/how-to/register-machines-using-setup-keys.mdx index 5fa4f9a0..6c1a927d 100644 --- a/src/pages/how-to/register-machines-using-setup-keys.mdx +++ b/src/pages/how-to/register-machines-using-setup-keys.mdx @@ -23,14 +23,11 @@ There are 2 types of setup keys: ## Ephemeral peers -Ephemeral peers allows you to add temporary peers to your network and having them automatically removed once they become offline for over 10 minutes. -This is particular useful when you want to run NetBird with Kubernetes pods or autoscaling groups. +You can create a setup key with the ephemeral peers option enabled. +Peers added with this key that later become offline for over 10 minutes will be removed automatically from the NetBird system. -## Allow Extra DNS Labels -This flag allows peers added with the setup key to add additional extra DNS labels to their peers. -This is useful when you want to add more context to your peers and access these peers using a single domain name. +This is useful when you want to add containers or auto scaling instances to your network. -```bash {{ title: 'Starting NetBird Client' }} ## Using setup keys Setup keys are available in the NetBird Management Dashboard under the `Setup Keys` tab [https://app.netbird.io/setup-keys](https://app.netbird.io/setup-keys). @@ -53,6 +50,13 @@ You can set expiration when creating a key. When expired, the setup key can't be By default, every reusable key has unlimited usage. We recommend limiting the number of times the key can be used, e.g., set it to 30 if you need to enroll only 30 machines. +## Allow Extra DNS labels + +You can create a setup key with the `Allow Extra DNS labels` option enabled. +When enabled, peers added using this key will be able to add extra DNS labels and with that other peers in the NetBird network can reach them with these labels. + +If you add multiple peers with the same labels, they became part of a DNS round-robin group for the shared label. This is useful to access services running on multiple nodes. + ## Peer Auto-grouping