Primer commit
This commit is contained in:
35
deployments/mariadb.yaml
Normal file
35
deployments/mariadb.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: mariadb
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: mariadb
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: mariadb
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: mariadb
|
||||||
|
image: mariadb:10.11
|
||||||
|
env:
|
||||||
|
- name: MYSQL_ROOT_PASSWORD
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
value: nextcloud
|
||||||
|
ports:
|
||||||
|
- containerPort: 3306
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/lib/mysql
|
||||||
|
name: mariadb-storage
|
||||||
|
volumes:
|
||||||
|
- name: mariadb-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: mariadb-pvc
|
35
deployments/nextcloud.yaml
Normal file
35
deployments/nextcloud.yaml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: nextcloud
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: nextcloud
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: nextcloud
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: nextcloud
|
||||||
|
image: nextcloud:27
|
||||||
|
env:
|
||||||
|
- name: MYSQL_PASSWORD
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_DATABASE
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_USER
|
||||||
|
value: nextcloud
|
||||||
|
- name: MYSQL_HOST
|
||||||
|
value: mariadb
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
volumeMounts:
|
||||||
|
- mountPath: /var/www/html
|
||||||
|
name: nextcloud-storage
|
||||||
|
volumes:
|
||||||
|
- name: nextcloud-storage
|
||||||
|
persistentVolumeClaim:
|
||||||
|
claimName: nextcloud-pvc
|
25
ingress/ingress.yaml
Normal file
25
ingress/ingress.yaml
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-ingress
|
||||||
|
namespace: nextcloud
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: "letsencrypt-prod"
|
||||||
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- nextcloud.manabo.org
|
||||||
|
secretName: nextcloud-tls
|
||||||
|
rules:
|
||||||
|
- host: nextcloud.manabo.org
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: nextcloud
|
||||||
|
port:
|
||||||
|
number: 80
|
11
kustomization.yaml
Normal file
11
kustomization.yaml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
resources:
|
||||||
|
- namespace.yaml
|
||||||
|
- deployments/mariadb.yaml
|
||||||
|
- deployments/nextcloud.yaml
|
||||||
|
- services/mariadb.yaml
|
||||||
|
- services/nextcloud.yaml
|
||||||
|
- pvc/mariadb-pvc.yaml
|
||||||
|
- pvc/nextcloud-pvc.yaml
|
||||||
|
- ingress/ingress.yaml
|
4
namespace.yaml
Normal file
4
namespace.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: nextcloud
|
12
pvc/mariadb-pvc.yaml
Normal file
12
pvc/mariadb-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: mariadb-pvc
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 8Gi
|
12
pvc/nextcloud-pvc.yaml
Normal file
12
pvc/nextcloud-pvc.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: PersistentVolumeClaim
|
||||||
|
metadata:
|
||||||
|
name: nextcloud-pvc
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
storageClassName: nfs-manabo
|
||||||
|
resources:
|
||||||
|
requests:
|
||||||
|
storage: 20Gi
|
10
services/mariadb.yaml
Normal file
10
services/mariadb.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: mariadb
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 3306
|
||||||
|
selector:
|
||||||
|
app: mariadb
|
10
services/nextcloud.yaml
Normal file
10
services/nextcloud.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: nextcloud
|
||||||
|
namespace: nextcloud
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 80
|
||||||
|
selector:
|
||||||
|
app: nextcloud
|
Reference in New Issue
Block a user