Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.29] - K3s does not respect data-dir set via config file drop-in, or via env var #10593

Closed
brandond opened this issue Jul 29, 2024 · 1 comment
Assignees
Milestone

Comments

@brandond
Copy link
Member

Backport fix for K3s does not respect data-dir set via config file drop-in, or via env var

@ShylajaDevadiga
Copy link
Contributor

Validated using k3s version v1.29.7-rc2+k3s1

Environment Details

Infrastructure
Cloud EC2 instance

Node(s) CPU architecture, OS, and Version:
Ubuntu 22.04

Cluster Configuration:
Single node

Results from validation the scenarios from the issue
Scenario 1:

# mkdir -p /etc/rancher/k3s; echo "data-dir: /k8s" >> /etc/rancher/k3s/config.yaml; curl -fL https://get.k3s.io| INSTALL_K3S_VERSION=v1.29.7-rc2+k3s1 INSTALL_K3S_CHANNEL=testing sh -s - server --cluster-init
# ls /k8s
agent  data  server

# K3S_DATA_DIR=/k8s k3s-uninstall.sh
# ls /k8s
ls: cannot access '/k8s': No such file or directory

Scenario 2:

curl -fL https://get.k3s.io| INSTALL_K3S_VERSION=v1.29.7-rc2+k3s1 INSTALL_K3S_CHANNEL=testing sh -s - server --cluster-init --data-dir=/k8s;
# ls /k8s
agent  data  server

# K3S_DATA_DIR=/k8s k3s-uninstall.sh
# ls /k8s
ls: cannot access '/k8s': No such file or directory

Scenario 3:

mkdir -p /etc/rancher/k3s/config.yaml.d; echo "data-dir: /k8s" >> /etc/rancher/k3s/config.yaml.d/99-data-dir.yaml;curl -fL https://get.k3s.io| INSTALL_K3S_VERSION=v1.29.7-rc2+k3s1 INSTALL_K3S_CHANNEL=testing sh -s - server --cluster-init
# ls /k8s
agent  data  server

# K3S_DATA_DIR=/k8s k3s-uninstall.sh
# ls /k8s
ls: cannot access '/k8s': No such file or directory

Scenario 4:

curl -fL https://get.k3s.io| K3S_DATA_DIR=/k8s INSTALL_K3S_VERSION=v1.29.7-rc2+k3s1 INSTALL_K3S_CHANNEL=testing sh -s - server --cluster-init
# ls /k8s
agent  data  server

# K3S_DATA_DIR=/k8s k3s-uninstall.sh
# ls /k8s
ls: cannot access '/k8s': No such file or directory

@github-project-automation github-project-automation bot moved this from To Test to Done Issue in K3s Development Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

2 participants