-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added storageclass-aws-standard-resizeable.yaml
- Loading branch information
1 parent
bfbc824
commit 8f195ee
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# | ||
# Author: Hari Sekhon | ||
# Date: 2024-12-03 19:03:03 +0700 (Tue, 03 Dec 2024) | ||
# | ||
# vim:ts=2:sts=2:sw=2:et | ||
# lint: k8s | ||
# | ||
# https://github.com/HariSekhon/Kubernetes-configs | ||
# | ||
# License: see accompanying Hari Sekhon LICENSE file | ||
# | ||
# If you're using my code you're welcome to connect with me on LinkedIn | ||
# and optionally send me feedback to help improve or steer this or other code I publish | ||
# | ||
# https://www.linkedin.com/in/HariSekhon | ||
# | ||
|
||
# ============================================================================ # | ||
# S t o r a g e C l a s s - A W S G P 3 R e s i z e a b l e | ||
# ============================================================================ # | ||
|
||
# Storage Class for AWS GP3 disk that allows clients to resize (increase only) simply via changing their requested allocation size | ||
|
||
# https://kubernetes.io/docs/concepts/storage/storage-classes/ | ||
|
||
# https://kubernetes.io/blog/2018/07/12/resizing-persistent-volumes-using-kubernetes/ | ||
|
||
# https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/storage-class-v1/ | ||
|
||
# If you have already deployed using the default 'standard' storageclass and want to be able to resize that, you can patch the default storage class to permit it like so: | ||
# | ||
# kubectl patch sc ebs-sc -p '{"allowVolumeExpansion": true}' | ||
|
||
--- | ||
apiVersion: storage.k8s.io/v1 | ||
kind: StorageClass | ||
metadata: | ||
# generic name so on another cloud vendor you just replace the storageclass but the deployment / statefulset manifests don't need modifying | ||
name: standard-resizeable | ||
provisioner: kubernetes.io/aws-ebs | ||
parameters: | ||
type: gp3 | ||
#fsType: ext4 | ||
volumeBindingMode: WaitForFirstConsumer | ||
allowVolumeExpansion: true | ||
reclaimPolicy: Retain # for safety, else default: Delete |