apiVersion: v1 kind: Namespace metadata: name: nextcloud-testing --- apiVersion: apps/v1 kind: Deployment metadata: name: nextcloud-webserver namespace: nextcloud-testing spec: replicas: 1 selector: matchLabels: app: nextcloud-webserver template: metadata: labels: app: nextcloud-webserver spec: # nodeName: kube-master containers: - name: nextcloud-webserver # image: nextcloud:apache image: nextcloud:28.0.5-apache imagePullPolicy: Always ports: - containerPort: 80 name: webserver-port env: #- name: REDIS_HOST # value: "redis://redis:6379" # - name: POSTGRES_HOST # value: "db" - name: SQLITE_DATABASE value: "nextcloud" volumeMounts: # - name: nextcloud # mountPath: /var/www/html - name: nextcloud-webserver-data mountPath: /var/www/html # - name: nextcloud-webserver-data-data # mountPath: /var/www/html/data # - name: nextcloud-webserver-config # mountPath: /var/www/html/config # - name: nextcloud-webserver-apps # mountPath: /var/www/html/apps volumes: # - name: nextcloud # hostPath: # path: /opt/kubernetes/Nextcloud_kube/data/nextcloud # - name: nextcloud-webserver-data # persistentVolumeClaim: # claimName: nextcloud-webserver - name: nextcloud-webserver-data persistentVolumeClaim: claimName: nextcloud-webserver-data # - name: nextcloud-webserver-config # persistentVolumeClaim: # claimName: nextcloud-webserver-config # - name: nextcloud-webserver-apps # persistentVolumeClaim: # claimName: nextcloud-webserver-apps securityContext: # Will mount configuration files as www-data (id: 33) for nextcloud fsGroup: 33 --- apiVersion: v1 kind: Service metadata: name: webserver namespace: nextcloud-testing spec: ports: - name: http port: 80 # targetPort: webserver-port protocol: TCP # nodePort: 31236 # type: NodePort selector: app: nextcloud-webserver