# Single replica required — SQLite (ReadWriteOnce PVC) cannot be shared across pods. apiVersion: apps/v1 kind: Deployment metadata: name: vitfit namespace: vitfit labels: app: vitfit spec: replicas: 1 selector: matchLabels: app: vitfit # Recreate ensures the old pod releases the PVC before the new one starts. strategy: type: Recreate template: metadata: labels: app: vitfit spec: securityContext: runAsNonRoot: true runAsUser: 1000 runAsGroup: 1000 fsGroup: 1000 containers: - name: app image: vitfit:latest # replace with your registry path imagePullPolicy: Always ports: - containerPort: 3000 name: http envFrom: - configMapRef: name: vitfit-config - secretRef: name: vitfit-secrets volumeMounts: - name: data mountPath: /data resources: requests: cpu: "250m" memory: "256Mi" limits: cpu: "1000m" memory: "512Mi" livenessProbe: httpGet: path: /health port: 3000 initialDelaySeconds: 20 periodSeconds: 30 timeoutSeconds: 5 failureThreshold: 3 readinessProbe: httpGet: path: /health port: 3000 initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 3 failureThreshold: 3 volumes: - name: data persistentVolumeClaim: claimName: vitfit-data