6 min read
The basic idea behind a StatefulSet is to be able to manage stateful workloads on Kubernetes, unlike Deployments, creating a unique identity for each Pod using a common spec.
With this in mind we might just copy the Pod's template from a Deployment to a StatefulSet object to make it stateful, but it's not always quite that simple.
2 min read
A PersistentVolume is the abstract representation of storage as a resource within a Kubernetes cluster. The attributes describe the storage resource, it's underlying resource can either be a disk provisioned by the cloud you are using or something as simple as manually provisioned NFS disk
On PersistentVolumes we can configure several reclaim policies to define how it's data removal is handled once the PersistentVolume object is deleted.
2 min read
If you have an existing EBS volume that you want to use on your EKS cluster, or you don't want to let Kubernetes to manage your volumes, you can use awsElasticBlockStore to link an existing EBS volume to a PersistentVolume or use it directly as a volume on a pod spec:
3 min read
On a AWS EKS cluster, at the time of this writing, by default you cannot resize volumes provisioned with the default gp2 StorageClass. This is because on the default StorageClass the allowVolumeExpansion is set to false, preventing the volume expansion:
$ kubectl get sc NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE gp2 (default) kubernetes.io/aws-ebs Delete WaitForFirstConsumer false 78d