storage: Add manifest for Longhorn
I was originally going to use GlusterFS to provide persistent storage for pods, but [Heketi][0], the component that provides the API for the Kubernetes StorageClass, is in "deep maintenance" status and looks to be practically dead. I was a bit afraid to try to use it because of that, and went looking for guidance on Reddit, which is how I discovered Longhorn.dch-webhooks-secrets
parent
30cbc568d0
commit
9b86a117ef
|
@ -0,0 +1,31 @@
|
||||||
|
# Persistent Storage Using Longhorn
|
||||||
|
|
||||||
|
[Longhorn] is a Kubernetes-native persistent storage system. It is quite
|
||||||
|
complex, but installing it is fairly straightforward.
|
||||||
|
|
||||||
|
[Longhorn]: https://longhorn.io
|
||||||
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
This is mostly based on the official [Install with Kubectl][0] 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][1] instructions.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl apply -f longhorn.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Ingress
|
||||||
|
|
||||||
|
Expose the Longhorn UI outside the cluster:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
kubectl apply -f longhorn-ingress.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
[0]: https://longhorn.io/docs/1.3.0/deploy/install/install-with-kubectl/
|
||||||
|
[1]: https://longhorn.io/docs/1.3.0/advanced-resources/deploy/node-selector/
|
|
@ -0,0 +1,29 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: longhorn-ingress
|
||||||
|
namespace: longhorn-system
|
||||||
|
annotations:
|
||||||
|
# type of authentication
|
||||||
|
nginx.ingress.kubernetes.io/auth-type: basic
|
||||||
|
# prevent the controller from redirecting (308) to HTTPS
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: 'false'
|
||||||
|
# name of the secret that contains the user/password definitions
|
||||||
|
nginx.ingress.kubernetes.io/auth-secret: basic-auth
|
||||||
|
# message to display with an appropriate context why the authentication is required
|
||||||
|
nginx.ingress.kubernetes.io/auth-realm: 'Authentication Required '
|
||||||
|
# custom max body size for file uploading like backing image uploading
|
||||||
|
nginx.ingress.kubernetes.io/proxy-body-size: 10000m
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: longhorn.pyrocufflink.blue
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: Prefix
|
||||||
|
path: /
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: longhorn-frontend
|
||||||
|
port:
|
||||||
|
number: 80
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue