Rancher Storage Class
Kafka Example
Get PVC
bash
kubectl get pvc | grep kafka
bash
NAME STATUS VOLUME CAPACITY STORAGECLASS
data-foobar-kafka-controller-0 Bound pvc-1cb563e9-xxx 8Gi RWO local-path 37d
Get PV
bash
kubectl get pv -o yaml pvc-1cb563e9-3945-474c-b7e3-da64b7c7d18e | grep ' hostPath' -A 5
bash
hostPath:
path: /opt/local-path-provisioner/pvc-1cb563e9-3945-474c-b7e3-da64b7c7d18e_monitor_data-foobar-kafka-controller-0
type: DirectoryOrCreate
Get Storage Class
bash
kubectl get sc
bash
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
local-path (default) rancher.io/local-path Retain WaitForFirstConsumer false 2y18d
managed-nfs-storage fuseim.pri/ifs Retain Immediate false 2y18d
Get Local Path Config
bash
kubectl get cm -A | grep local-path-config
bash
kubectl -n local-path-storage get cm -o yaml local-path-config
You can see the path config.