-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add how tos for workloads on control planes, and scaling up
First set of how-tos. Signed-off-by: Steve Francis <steve.francis@talos-systems.com> Signed-off-by: Andrey Smirnov <andrey.smirnov@talos-systems.com>
- Loading branch information
1 parent
05b0b72
commit 81879fc
Showing
3 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: "How Tos" | ||
weight: 30 | ||
description: "How to guide for common tasks in Talos Linux" | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
title: "How to scale up a Talos cluster" | ||
description: "How to add more nodes to a Talos Linux cluster." | ||
aliases: | ||
|
||
--- | ||
|
||
To add more nodes to a Talos Linux cluster, follow the same procedure as when initially creating the cluster: | ||
|
||
- boot the new machines to install Talos Linux | ||
- apply the `worker.yaml` or `controlplane.yaml` configuration files to the new machines | ||
|
||
You need the `controlplane.yaml` and `worker.yaml` that were created when you initially deployed your cluster. | ||
These contain the certificates that enable new machines to join. | ||
|
||
Once you have the IP address, you can then apply the correct configuration for each machine you are adding, either `worker` or `controlplane`. | ||
|
||
```bash | ||
talosctl apply-config --insecure \ | ||
--nodes [NODE IP] \ | ||
--file controlplane.yaml | ||
``` | ||
|
||
The insecure flag is necessary because the PKI infrastructure has not yet been made available to the node. | ||
|
||
You do not need to bootstrap the new node. | ||
Regardless of whether you are adding a control plane or worker node, it will now join the cluster in its role. |
30 changes: 30 additions & 0 deletions
30
website/content/v1.4/talos-guides/howto/workers-on-controlplane.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: "How to enable workers on your control plane nodes" | ||
description: "How to enable workers on your control plane nodes." | ||
aliases: | ||
|
||
--- | ||
|
||
By default, Talos Linux taints control plane nodes so that workloads are not schedulable on them. | ||
|
||
In order to allow workloads to run on the control plane nodes (useful for single node clusters, or non-production clusters), follow the procedure below. | ||
|
||
Modify the MachineConfig for the controlplane nodes to add `allowSchedulingOnControlPlanes: true`: | ||
|
||
```yaml | ||
cluster: | ||
allowSchedulingOnControlPlanes: true | ||
``` | ||
|
||
This may be done via editing the `controlplane.yaml` file before it is applied to the controlplane nodes, by `talosctl edit machineconfig`, or by [patching the machine config]({{< relref "../configuration/patching">}}). | ||
|
||
> Note: if you edit or patch the machine config on a running control plane node to set `allowSchedulingOnControlPlanes: true`, it will be applied immediately, but will not have any effect until the next reboot. | ||
You may reboot the nodes via `talosctl reboot`. | ||
|
||
You may also immediately make the control plane nodes schedulable by running the below: | ||
|
||
```bash | ||
kubectl taint nodes --all node-role.kubernetes.io/control-plane- | ||
``` | ||
|
||
Note that unless `allowSchedulingOnControlPlanes: true` is set in the machine config, the nodes will be tainted again on next reboot. |