是否可以使用自己的永久存储卷(PVC)安装bitnami/etcd?

huangapple go评论71阅读模式
英文:

Is it possible to install bitnami/etcd using my own PVC?

问题

我正在使用AWS,为我的新PV和PVC创建了EFS。
我有一个K8s集群,节点位于不同的区域,所以我决定在节点在不同区域被杀死或重建时使用EFS。

我还创建了一个名为PV的PV:

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: some-test-pv
spec:
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  storageClassName: "gp3"
  persistentVolumeReclaimPolicy: Retain
  csi:
    driver: efs.csi.aws.com
    volumeHandle: fs-[我从AWS控制台获取的ID]

作为下一步,我试图安装bitnami/etcd(https://github.com/bitnami/charts/tree/main/bitnami/etcd),但我无法配置它以使用我的PV(我在values.yaml中使用 - helm install etcd -f values.yaml --namespace test bitnami/etcd):

persistence:
  enabled: true
  storageClass: ""
  annotations: {}

  accessModes:
    - ReadWriteOnce
  size: 1Gi
  selector:
    matchExpressions:
      - { key: name, operator: In, values: [some-test-pv] }

但看起来它试图使用ebs.csi.aws.com来创建PVC。是否可以将它指向EFS?

英文:

I am using AWS and I created EFS for my new PV and PVC.
I have K8s cluster with nodes in different zones, so I decided to use EFS for cases when node will be killed or died and recreated on node in different zone.

I also created PV with name:

---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: some-test-pv
spec:
  capacity:
    storage: 1Gi
  volumeMode: Filesystem
  accessModes:
    - ReadWriteOnce
  storageClassName: "gp3"
  persistentVolumeReclaimPolicy: Retain
  csi:
    driver: efs.csi.aws.com
    volumeHandle: fs-[ID which I got from AWS console]

As a next step - I am trying to install bitnami/etcd (https://github.com/bitnami/charts/tree/main/bitnami/etcd) but I cant configure it to use my PV (I am using values.yaml - helm install etcd -f values.yaml --namespace test bitnami/etcd):

persistence:
  enabled: true
  storageClass: ""
  annotations: {}

  accessModes:
    - ReadWriteOnce
  size: 1Gi
  ## @param persistence.selector [object] Selector to match an existing Persistent Volume
  ## ref: https://kubernetes.io/docs/concepts/storage/persistent-volumes/#selector
  ##
  selector:
    matchExpressions:
      - { key: name, operator: In, values: [some-test-pv] }

But looks like it trying to create PVC using ebs.csi.aws.com.
Is it possible to point it to EFS?

答案1

得分: 0

在值中,您可以使用以下内容:

persistence:
...
  existingClaim: some-test-pv
英文:

In values you can use this:

persistence:
...
  existingClaim: some-test-pv

huangapple
  • 本文由 发表于 2023年3月1日 08:55:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/75598691.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定