Skip to content

Instantly share code, notes, and snippets.

@zutigrm
Created April 20, 2021 21:39
Show Gist options
  • Save zutigrm/af94f7a242485ef77252fc17f085bdba to your computer and use it in GitHub Desktop.
Save zutigrm/af94f7a242485ef77252fc17f085bdba to your computer and use it in GitHub Desktop.
Nextcloud service and deployment yaml file
apiVersion: v1
kind: Service
metadata:
name: nextcloud
spec:
ports:
- port: 80
targetPort: 80
selector:
app: nextcloud
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nextcloud
spec:
selector:
matchLabels:
app: nextcloud
strategy:
type: Recreate
template:
metadata:
labels:
app: nextcloud
spec:
containers:
- image: nextcloud:latest
name: nextcloud
ports:
- containerPort: 80
name: nextcloud
volumeMounts:
- name: nextcloud-data
mountPath: /var/www/html
volumes:
- name: nextcloud-data
persistentVolumeClaim:
claimName: nextcloud-shared-storage-claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment