• Dynamically provisioned PersistentVolumes using StatefulSet

    6 min read

    kubernetes PersistentVolume Deployment StatefulSet

    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.

    21/02/2022

    Read more...
  • Kubernetes PersistentVolume: Data cleanup on object deletion

    2 min read

    kubernetes PersistentVolume persistentVolumeReclaimPolicy

    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.

    12/01/2022

    Read more...
  • kubernetes: Mount an existing EBS volume to a pod

    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:

    24/05/2021

    Read more...
  • AWS EKS: How to resize Persistent Volumes

    3 min read

    AWS EKS resize volume

    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
    

    10/05/2021

    Read more...

From pet to cattle
Treat your kubernetes clusters like cattle, not pets