1
0
Fork 0
kubernetes/storage
Dustin 5f2aaefc35 stroage: Set default storage class
Setting a default storage class allows PersistentVolumes to be declared
without selecting a specific storage class in each object spec.
2022-08-23 21:21:54 -05:00
..
README.md storage: Show how to create admin password secret 2022-08-23 21:21:43 -05:00
longhorn-ingress.yaml storage: Add manifest for Longhorn 2022-07-31 00:57:53 -05:00
longhorn.yaml stroage: Set default storage class 2022-08-23 21:21:54 -05:00

README.md

Persistent Storage Using Longhorn

Longhorn is a Kubernetes-native persistent storage system. It is quite complex, but installing it is fairly straightforward.

Installation

This is mostly based on the official Install with Kubectl instructions. I wanted to add node selectors to the user-deployed and system-managed components, to ensure that Longhorn only runs on x86_64 nodes, per the Node Selector instructions.

kubectl apply -f longhorn.yaml

Ingress

Expose the Longhorn UI outside the cluster:

printf 'Longhorn username: '
read longhorn_username
printf 'Longhorn password: '
read -s longhorn_password
printf '%s:%s\n' \
    "${longhorn_username}" \
    "$(openssl passwd -stdin -apr1 <<< "${longhorn_password}")" \
    > auth
kubectl create secret generic -n longhorn-system basic-auth --from-file auth
kubectl apply -f longhorn-ingress.yaml