k3s
k3s copied to clipboard
[Documentation] Context label needs to be set on the dir used by local-path-provisioner
Issue: ProvisioningFailed without context label on dir. PVC, Pod will be in pending state
By default local-path-provisioner is not deployed with rke2. The dir used by local-path-provisioner needs to have the context label set. Command used to set the label on the default dir.
chcon -t container_file_t -R /opt/local-path-provisioner
Seeing as how rke2 does not bundle in local-path-provisioner by default, but K3s does and too has (experimental) selinux support. We're going to move this issue to rancher/k3s.
This was fixed at some point in selinux, and pvc come up just fine. No documentation change is necessary.
[root@smoke vagrant]# k3s kubectl get pods
NAME READY STATUS RESTARTS AGE
volume-test 1/1 Running 0 82s
system_u:system_r:container_t:s0:c744,c913 root 8642 0.0 1.9 733716 35700 ? Ssl 21:31 0:01 local-path-provisioner start --config /etc/config/config.json