From 805194852878424203dd9642d1a331c8a486b97a Mon Sep 17 00:00:00 2001 From: Harold Cheng Date: Tue, 11 Jun 2024 15:07:29 +0800 Subject: [PATCH] docs: mention ipam when creating multiserver cluster --- docs/faq/faq.md | 8 -------- docs/usage/multiserver.md | 10 ++++++++++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/faq/faq.md b/docs/faq/faq.md index 0390e4fe3..611cbb4ef 100644 --- a/docs/faq/faq.md +++ b/docs/faq/faq.md @@ -32,14 +32,6 @@ --k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*' ``` -## Restarting a multi-server cluster or the initializing server node fails - -- What you do: You create a cluster with more than one server node and later, you either stop `server-0` or stop/start the whole cluster -- What fails: After the restart, you cannot connect to the cluster anymore and `kubectl` will give you a lot of errors -- What causes this issue: it's a [known issue with dqlite in `k3s`](https://github.com/rancher/k3s/issues/1391) which doesn't allow the initializing server node to go down -- What's the solution: Hopefully, this will be solved by the planned [replacement of dqlite with embedded etcd in k3s](https://github.com/rancher/k3s/pull/1770) -- Related issues: [#262](https://github.com/k3d-io/k3d/issues/262) - ## Passing additional arguments/flags to k3s (and on to e.g. the kube-apiserver) - The Problem: Passing a feature flag to the Kubernetes API Server running inside k3s. diff --git a/docs/usage/multiserver.md b/docs/usage/multiserver.md index 0886a131f..a6a686dab 100644 --- a/docs/usage/multiserver.md +++ b/docs/usage/multiserver.md @@ -13,6 +13,16 @@ The first server to be created will use the `--cluster-init` flag and k3d will w k3d cluster create multiserver --servers 3 ``` +!!! info "Restarting cluster may fail" + When you restart the cluster, each node's IP (meaning the underlying container's IP) could change. In this + situation, a node might fail to join the existing cluster and consequently fail to start. To address this, + you can use the experimental IPAM (IP Address Management) feature to assign each container a static IP. + To enable this, create the cluster with the `--subnet auto` or `--subnet 172.45.0.0/16` + (or whatever subnet you need) flags. With `--subnet auto`, k3d will create a fake docker network + to get an available subnet. + + See the relavent issue [#550](https://github.com/k3d-io/k3d/issues/550) for more details. + ## Adding server nodes to a running cluster In theory (and also in practice in most cases), this is as easy as executing the following command: