apiVersion: apps/v1 kind: Deployment metadata: name: simpleasm namespace: cube-simpleasm labels: app: simpleasm spec: replicas: 1 strategy: # PVC 是 RWO,rolling 上线时新旧 pod 抢 PVC 会卡住,直接 Recreate type: Recreate selector: matchLabels: app: simpleasm template: metadata: labels: app: simpleasm spec: imagePullSecrets: - name: registry-creds containers: - name: simpleasm image: registry.famzheng.me/mochi/simpleasm:latest imagePullPolicy: IfNotPresent ports: - containerPort: 8080 name: http env: - name: DB_PATH value: /data/app.db readinessProbe: httpGet: path: /healthz port: http initialDelaySeconds: 1 periodSeconds: 5 livenessProbe: httpGet: path: /healthz port: http initialDelaySeconds: 5 periodSeconds: 15 resources: requests: cpu: 10m memory: 16Mi limits: cpu: 200m memory: 64Mi volumeMounts: - name: data mountPath: /data volumes: - name: data persistentVolumeClaim: claimName: simpleasm-data