add nfs storage

This commit is contained in:
Lee 2024-09-22 00:17:56 +01:00
parent a8d5b00312
commit b2570c582d
5 changed files with 24 additions and 30 deletions

1
.gitignore vendored

@ -1 +1,2 @@
kubeconfig kubeconfig
secrets.yaml

@ -1,30 +0,0 @@
kind: Service
apiVersion: v1
metadata:
name: cdn-external
namespace: traefik
spec:
type: ExternalName
externalName: internal ip
ports:
- name: http
port: service port
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: cdn-external-ingress
namespace: traefik
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- websecure
routes:
- match: Host(`example.com`)
kind: Rule
services:
- name: cdn-external
port: service port
tls:
secretName: example.com

@ -3,3 +3,4 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources: resources:
- crds - crds
- nfs

@ -0,0 +1,6 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: nfs-csi
resources:
- nfs-csi.yaml

@ -0,0 +1,16 @@
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nfs-csi
annotations:
storageclass.kubernetes.io/is-default-class: "true"
provisioner: nfs.csi.k8s.io
parameters:
server: 10.0.136
share: /mnt/user/Kubernetes
reclaimPolicy: Delete
volumeBindingMode: Immediate
mountOptions:
- hard
- nfsvers=4.1