mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-11-07 08:54:04 +01:00
kubernetes pv and pvc
This commit is contained in:
parent
66d63709bd
commit
0a53867d87
11
kubernetes/templates/pv-and-pvc/civo-pvc.yml
Normal file
11
kubernetes/templates/pv-and-pvc/civo-pvc.yml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: civo
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
storageClassName: civo-volume
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
27
kubernetes/templates/pv-and-pvc/civo-web.yml
Normal file
27
kubernetes/templates/pv-and-pvc/civo-web.yml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: civo-web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: civo-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: civo-web
|
||||
spec:
|
||||
containers:
|
||||
- name: civo-web
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: civo
|
||||
mountPath: "/usr/share/nginx/html"
|
||||
volumes:
|
||||
- name: civo
|
||||
persistentVolumeClaim:
|
||||
claimName: civo
|
27
kubernetes/templates/pv-and-pvc/local-web.yml
Normal file
27
kubernetes/templates/pv-and-pvc/local-web.yml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: local-web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: local-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: local-web
|
||||
spec:
|
||||
containers:
|
||||
- name: local-web
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: local
|
||||
mountPath: "/usr/share/nginx/html"
|
||||
volumes:
|
||||
- name: local
|
||||
hostPath:
|
||||
path: /usr/share/nginx/html
|
13
kubernetes/templates/pv-and-pvc/nfs-pv.yml
Normal file
13
kubernetes/templates/pv-and-pvc/nfs-pv.yml
Normal file
@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: nfs
|
||||
spec:
|
||||
capacity:
|
||||
storage: 500Mi
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: nfs
|
||||
nfs:
|
||||
server: 192.168.1.7
|
||||
path: "/srv/nfs"
|
11
kubernetes/templates/pv-and-pvc/nfs-pvc.yml
Normal file
11
kubernetes/templates/pv-and-pvc/nfs-pvc.yml
Normal file
@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: nfs
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
storageClassName: nfs
|
||||
resources:
|
||||
requests:
|
||||
storage: 100Mi
|
27
kubernetes/templates/pv-and-pvc/nfs-web.yml
Normal file
27
kubernetes/templates/pv-and-pvc/nfs-web.yml
Normal file
@ -0,0 +1,27 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: nfs-web
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: nfs-web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: nfs-web
|
||||
spec:
|
||||
containers:
|
||||
- name: nfs-web
|
||||
image: nginx
|
||||
ports:
|
||||
- name: web
|
||||
containerPort: 80
|
||||
volumeMounts:
|
||||
- name: nfs
|
||||
mountPath: "/usr/share/nginx/html"
|
||||
volumes:
|
||||
- name: nfs
|
||||
persistentVolumeClaim:
|
||||
claimName: nfs
|
Loading…
Reference in New Issue
Block a user