blog added

This commit is contained in:
Justine Pelletreau 2022-06-19 13:57:11 +02:00
parent 9c6bb08620
commit 8380588edc
5 changed files with 84 additions and 0 deletions

26
blog/blog-daemonset.yaml Normal file
View File

@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
labels:
run: blog
name: blog
spec:
selector:
matchLabels:
run: blog
template:
metadata:
labels:
run: blog
spec:
containers:
- image: nginx:latest
name: blog
volumeMounts:
- mountPath: /usr/share/nginx/html
name: blog
restartPolicy: Always
volumes:
- name: blog
persistentVolumeClaim:
claimName: blog

17
blog/blog-ingress.yaml Normal file
View File

@ -0,0 +1,17 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: blog-ingr
spec:
ingressClassName: nginx
rules:
- host: cptrthgs.fr
http:
paths:
- pathType: Prefix
backend:
service:
name: blog
port:
number: 80
path: /

View File

@ -0,0 +1,15 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: blog
spec:
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
nfs:
server: nas.sq.lan
path: "/swarmdata/blog"
mountOptions:
- nfsvers=4.2

13
blog/blog-pvc.yaml Normal file
View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: blog
spec:
accessModes:
- ReadWriteMany
storageClassName: ""
resources:
requests:
storage: 10Gi
volumeName: blog

13
blog/blog-service.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
labels:
run: blog
name: blog
spec:
ports:
- name: "blog"
port: 80
targetPort: 80
selector:
run: blog