83 lines
1.3 KiB
YAML
83 lines
1.3 KiB
YAML
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: nextcloud
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: nextcloud
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
containers:
|
|
- name: nc-image
|
|
image: nextcloud
|
|
ports:
|
|
- containerPort: 80
|
|
volumeMounts:
|
|
- name: files
|
|
mountPath: /var/www/html
|
|
volumes:
|
|
- name: files
|
|
persistentVolumeClaim:
|
|
claimName: office-files
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: office-svc
|
|
spec:
|
|
selector:
|
|
app: nextcloud
|
|
ports:
|
|
- port: 80
|
|
targetPort: 80
|
|
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: office-files
|
|
labels:
|
|
app: nextcloud
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
resources:
|
|
requests:
|
|
storage: 15Gi
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
annotations:
|
|
cert-manager.io/cluster-issuer: letsencrypt-issuer
|
|
kubernetes.io/ingress.class: traefik
|
|
name: office-ingress
|
|
spec:
|
|
rules:
|
|
- host: office.clarkeis.com
|
|
http:
|
|
paths:
|
|
- path: /
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: office-svc
|
|
port:
|
|
number: 80
|
|
tls:
|
|
- hosts:
|
|
- office.clarkeis.com
|
|
secretName: office-tls
|
|
|