DevOps Classroomnotes 27/Feb/2022


  • K8s supports many types of Volumes
    • Ephemeral Volumes:
      • These volume exist as long as Pod Exists, But once Pod is destroyed this volume is also destroyed
    • Persistent Volumes (Storage Classes & Persisten Volume Claims):
      • This Volume exists beyond the lifetime of a Pod. K8s doesnot destroy persistent volumes
  • In both the volumes k8s supports different volumes
    • azureDisk
    • azureFile
    • emptyDir
    • gcePersistentDisk
    • aws ebs
    • hostPath
    • local
    • nfs
  • To understand Persistent Volumes Better, we need to understand
    • StorageClasses
    • Persistent Volume Claims
  • A persistent Volume (PV) is a piece of storage in the cluster that has been provisioned by an adminstrator or it can be dynamically provisioned with StorageClasses.
  • A PersistentVolumeClaim (PVC) is a request for storage by a user. Claims can request specific size and access modes
  • Provisioning Storage

    • Static
    • Dynamic
  • Lets Create a K8s Cluster in Azure: Refer Here
  • Lets Create a K8s Cluster in AWS (Elastic Kubernetes Service):

    • Refer Here
    • To connect to AWS we need to create an IAM user Refer Here
    • Install aws cli Refer Here
      sudo apt update
      sudo apt install unzip -y
      sudo ./aws/install

    • Install kubectl Refer Here
      curl -o kubectl
      sudo cp kubectl /usr/bin
      sudo chmod 755 /usr/bin/kubectl
      kubectl version
    • Installing eksctl Refer Here
      curl --silent --location "$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
      sudo mv /tmp/eksctl /usr/local/bin
      eksctl version
    • Refer Here for eksctl documentation
    • Now lets create cluster using eksctl
      eksctl create cluster \
      --name my-cluster \
      --version 1.21 \

  • Note:

    • All the images from gitbash will be eks and from powershell will be aks
  • Persistent Volumes

  • Creating a Pod/Replication Controller/Deployment with PV, PVC and SC in Azure
    • Azure gives the default storage classes
    • Created a pvc
    • using the pvc claim in rs
    • Lets create a load balancer for testing purposes to connect to databse from location
    • Insert some data into database
    • Now delete replicaset
    • Now recreate the replicaset and view the data in the database
    • Refer Here for the manifests created for Azure
  • Creating PVC on AWS EKS
  • Note: Will create a document with resolution on storage


  • Stateful set manages Pods that are based on identical container spec.
  • Stateful set maintains stick identity of their pods.
  • These pods are created from same spec, but are not interchangable: each has a persistent identifier that it maintains across rescheduling

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner