我有一个来自 mongo 的 statefulset,有 2 个卷挂载:
volumeMounts:
- name: mongo-persistent-storage
mountPath: /data/db
- name: mongo-config-storage
mountPath: /data/configdb
我想知道如何在 volumeClaimTemplates 中添加第二卷:
volumeClaimTemplates:
- metadata:
name: mongo-persistent-storage
annotations:
volume.beta.kubernetes.io/storage-class: "sc-infra"
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 2Gi