[Feature Request] Support K3s/RKE option --data-dir #329

Open
opened 2024-10-26 16:55:44 +00:00 by cloudymax · 0 comments
cloudymax commented 2024-10-26 16:55:44 +00:00 (Migrated from github.com)

Describe the feature you'd like, and why

K3s and other SUSe k8s distros accept the option --data-dir which allows a user to specify an alternative location for k3s data to be stored (replaces /var/lib/rancher)

Currently, when we connect new nodes to the cluster, we check the default location even if data-dir has been specified under k8s_distros.k3s.k3s_yaml.data-dir in the config file. this leads to the following error when attaching a new node:

 > cat: /var/lib/rancher/k3s/server/node-token: No such file or directory

Describe alternatives you've considered, if any

This can sort-of be worked around by specifying a new storage class for local-path provisioned that points tot he desired directory but that will still leave the core k3s components installed to /var/lib/rancher which can cause unexpected disk-pressure issues.

## Describe the feature you'd like, and why K3s and other SUSe k8s distros accept the option `--data-dir` which allows a user to specify an alternative location for k3s data to be stored (replaces /var/lib/rancher) - https://docs.k3s.io/cli/server Currently, when we connect new nodes to the cluster, we check the default location even if `data-dir` has been specified under `k8s_distros.k3s.k3s_yaml.data-dir` in the config file. this leads to the following error when attaching a new node: ```console > cat: /var/lib/rancher/k3s/server/node-token: No such file or directory ``` ### Describe alternatives you've considered, if any This can sort-of be worked around by specifying a new storage class for local-path provisioned that points tot he desired directory but that will still leave the core k3s components installed to `/var/lib/rancher` which can cause unexpected disk-pressure issues.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
small-hack/smol-k8s-lab#329
No description provided.