- Longhorn installed and setup as the Default StorageClass for your Cluster
- Rancher up and running
- Target Cluster that you want to install Longhorn into
- Longhorn uses /var/lib/longhorn on the nodes of the Cluster to store data
1) From a browser, go to your Rancher Cluster Explorer and make sure you have the Target Cluster selected
4) OPTIONAL - If you want to change the default path used by Longhorn click 'Customize Default Settings'
Once Longhorn is installed, you can access the console by simply Selecting it in the Upper Left hand Menu and Click on the Longhorn Icon to launch the console
Notice in the console we don't have any Volumes yet
# test-pvc.yml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: test-pvc
spec:
storageClassName:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
# test-deplyment.yml
kind: Pod
apiVersion: v1
metadata:
name: test-pvc-pod
spec:
volumes:
- name: debug-pv
persistentVolumeClaim:
claimName: test-pvc
containers:
- name: debugger
image: busybox
command: ["sleep", "3600"]
volumeMounts:
- mountPath: "/data"
name: debug-pv
kubectl apply -f test-pvc
kubectl apply -f test-deplyment.yml