Closed cruizer closed 4 years ago
Setting the container_file_t
file context for the whole Local Path Provisioner subdirectory solves the issue:
# semanage fcontext -a -t container_file_t "/var/lib/rancher/k3s/storage(/.*)?"
# restorecon -R /var/lib/rancher/k3s/storage/
I will submit a pull request to update the policy shortly.
I have opened pull request #10 . Let me know if any issue needs fixing. :)
Hello,
I have run into this issue, while setting up my CentOS 8 / K3s lab.
Persistent volume claims fail to bind using K3s' built-in Local Path Provisioner, SELinux is blocking the directory creation:
The problem is gone after setting the SELinux mode to Permissive.
The policy RPM and required SELinux utils have been installed:
This is a fresh install of CentOS:
Example volume claim: