Switch to nfs for storage

This commit is contained in:
Jim Nicholson 2022-12-05 14:13:51 -08:00
parent 88be42be0e
commit 787ca80f4d
3 changed files with 32 additions and 5 deletions

View File

@ -32,8 +32,8 @@ spec:
volumeMounts: volumeMounts:
- name: pdns-admin-vol - name: pdns-admin-vol
mountPath: /data mountPath: /data
securityContext: # securityContext:
fsGroup: 1000 # fsGroup: 101
volumes: volumes:
- name: pdns-admin-vol - name: pdns-admin-vol
persistentVolumeClaim: persistentVolumeClaim:

View File

@ -6,6 +6,8 @@ metadata:
namespace: pdns namespace: pdns
annotations: annotations:
kubernetes.io/ingress.class: "traefik" kubernetes.io/ingress.class: "traefik"
traefik.ingress.kubernetes.io/redirect-entry-point: https
cert-manager.io/cluster-issuer: dns-clusterissuer
spec: spec:
rules: rules:
- host: pdns.home.thejimnicholson.com - host: pdns.home.thejimnicholson.com
@ -18,3 +20,7 @@ spec:
name: pdns-admin name: pdns-admin
port: port:
number: 80 number: 80
tls:
- hosts:
- pdns.home.thejimnicholson.com
secretName: pdns.home.thejimnicholson.com

View File

@ -1,5 +1,25 @@
--- ---
apiVersion: v1 apiVersion: v1
kind: PersistentVolume
metadata:
name: pdns-pv
namespace: pdns
labels:
app: pdns
spec:
storageClassName: "local-path"
capacity:
storage: 5Gi
accessModes:
- ReadWriteOnce
persistentVolumeReclaimPolicy: Retain
mountOptions:
- nolock
nfs:
server: 10.0.96.14
path: "/mnt/data/pdns-admin"
---
apiVersion: v1
kind: PersistentVolumeClaim kind: PersistentVolumeClaim
metadata: metadata:
name: pdns-admin-claim name: pdns-admin-claim
@ -7,7 +27,8 @@ metadata:
spec: spec:
accessModes: accessModes:
- ReadWriteOnce - ReadWriteOnce
storageClassName: longhorn storageClassName: "local-path"
resources: resources:
requests: requests:
storage: 1Gi storage: 5Gi
volumeName: pdns-pv