adding nfs provisioner
This commit is contained in:
18
10_nfs-provisioner/README.md
Normal file
18
10_nfs-provisioner/README.md
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# Helm Setup
|
||||||
|
|
||||||
|
```
|
||||||
|
helm repo add nfs-subdir-external-provisioner https://kubernetes-sigs.github.io/nfs-subdir-external-provisioner
|
||||||
|
|
||||||
|
helm repo update
|
||||||
|
|
||||||
|
helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner --values values.yaml
|
||||||
|
|
||||||
|
k get sc
|
||||||
|
k describe storageclass nfs-client
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
### Source
|
||||||
|
|
||||||
|
https://www.youtube.com/watch?v=uPt3VKQOMBs
|
||||||
|
|
||||||
31
10_nfs-provisioner/test-nginx.yaml
Normal file
31
10_nfs-provisioner/test-nginx.yaml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolume
|
||||||
|
metadata:
|
||||||
|
name: nginx-pvc
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
storageClassName: nfs-client
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 1Gi
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: nginx-pod
|
||||||
|
namespace: default
|
||||||
|
spec:
|
||||||
|
volumes:
|
||||||
|
- name: nginx-pvc
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nginx-pvc
|
||||||
|
containers:
|
||||||
|
- name: nginx
|
||||||
|
image: nginx:latest
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: "/usr/share/nginx/html"
|
||||||
|
name: nginx-pvc
|
||||||
3
10_nfs-provisioner/values.yaml
Normal file
3
10_nfs-provisioner/values.yaml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
nfs:
|
||||||
|
server: 192.168.178.40
|
||||||
|
path: /volume2/k8sdata
|
||||||
5
longhorn/README.md
Normal file
5
longhorn/README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
## Disable Localpath as default
|
||||||
|
kubectl get storageclass
|
||||||
|
|
||||||
|
kubectl patch storageclass local-path -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
|
||||||
|
|
||||||
Reference in New Issue
Block a user