Skip to content

Commit

Permalink
docs: mention ipam when creating multiserver cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
cjc7373 authored and iwilltry42 committed Jul 4, 2024
1 parent 7de36e8 commit 8051948
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 0 additions & 8 deletions docs/faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 10 additions & 0 deletions docs/usage/multiserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8051948

Please sign in to comment.