Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure PV and PVC in AWS-EKS cluster? #269

Closed
ghkdqhrbals opened this issue Dec 6, 2023 · 1 comment · Fixed by #270
Closed

How to configure PV and PVC in AWS-EKS cluster? #269

ghkdqhrbals opened this issue Dec 6, 2023 · 1 comment · Fixed by #270
Assignees
Labels
theme: documentation Improvements or additions to documentation

Comments

@ghkdqhrbals
Copy link
Owner

ghkdqhrbals commented Dec 6, 2023

Since I bound chat db pv and pvc with gp2 storageclass, it still doesn't work :(
image
image

@ghkdqhrbals ghkdqhrbals added the status: help! Help to solving this problem label Dec 6, 2023
@ghkdqhrbals ghkdqhrbals pinned this issue Dec 7, 2023
@ghkdqhrbals ghkdqhrbals unpinned this issue Dec 7, 2023
@ghkdqhrbals
Copy link
Owner Author

Problem

Since I run pvc without storageClassName, AWS-EKS automatically set my pvc with gp2 storageClassName which is AWS-EBS basic name.

Typically, when using a storage type like NFS, you define the PV directly, reference it to the PVC, and do not use a StorageClass.

StorageClass is primarily used to dynamically provision block storage provided by cloud providers (e.g. AWS, GCP, Azure). Network file systems such as NFS typically do not support dynamic provisioning and require PVs to be set up and managed in advance.

Solved

  • Setting the NFS PV's storageClassName to an empty string ("") indicates that the StorageClass is not used.
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pgadmin-pvc
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 100Mi
  storageClassName: ""    # Set empty string like this
  • Set private VPC network subnet in /etc/exports
    • /nfs_shared 172.31.1.0/16(rw,sync,no_root_squash,no_subtree_check)

@ghkdqhrbals ghkdqhrbals self-assigned this Dec 7, 2023
@ghkdqhrbals ghkdqhrbals added theme: documentation Improvements or additions to documentation and removed status: help! Help to solving this problem labels Dec 7, 2023
ghkdqhrbals added a commit that referenced this issue Dec 7, 2023
…heduling

[fix] #269 add empty string storageClass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant