--- apiVersion: apps/v1 kind: StatefulSet metadata: name: nextcloud namespace: kube-public labels: app: nextcloud spec: replicas: 1 selector: matchLabels: app: nextcloud template: metadata: labels: app: nextcloud spec: terminationGracePeriodSeconds: 60 containers: - name: nextcloud image: harbor.uenpay.com/base/nextcloud:28.0.4_smb #image: registry.cn-hangzhou.aliyuncs.com/zhengyu1992/nextcloud:28.0.4_smb imagePullPolicy: IfNotPresent ports: - containerPort: 80 env: - name: OC_PASS value: NextCloud2024 resources: limits: cpu: 4 memory: 8Gi requests: cpu: 2 memory: 4Gi volumeMounts: - name: data mountPath: /var/www/html volumeClaimTemplates: - metadata: name: data spec: accessModes: [ "ReadWriteOnce" ] resources: requests: storage: 300Gi --- apiVersion: v1 kind: Service metadata: name: nextcloud namespace: kube-public labels: app: nextcloud spec: selector: app: nextcloud ports: - name: nextcloud port: 80 protocol: TCP