apiVersion: apps/v1 kind: Deployment metadata: name: nextcloud labels: app: nextcloud spec: ports: - name: http port: 80 targetPort: 8080 selector: app: nextcloud type: ClusterIP ... apiVersion: apps/v1 kind: Deployment metadata: name: nextcloud labels: app: nextcloud spec: replicas: 1 selector: matchLabels: app: nextcloud template: metadata: labels: app: nextcloud spec: securityContext: runAsNonRoot: true seccompProfile: type: RuntimeDefault containers: - name: nextcloud image: nextcloud:apache securityContext: allowPrivilegedEscalation: false capabilities: drop: - ALL args: ["start"] env: - name: NC_PROXY value: "edge" - name: NC_HEALTH_ENABLED value: "true" - name: NC_PG_DATABASE valueFrom: secretKeyRef: key: NC_PG_DATABASE name: nc-db-secret volumeMounts: - mountPath: /var/www/html name: app-persistent-storage restartPolicy: Always volumes: - name: app-persistent-storage persistentVolumeClaim: claimName: app-pvc ports: - name: http containerPort: 8080 readinessProbe: httpGet: path: /health/ready port: 8080 initialDelaySeconds: 60 livenessProbe: httpGet: path: /health/live port: 8080 initialDelaySeconds: 60