DevOps Classroom notes 04/Feb/2024

Pod Scheduling

Pod affinity and antiaffinity

  • In this example we had tried to place a pod B
  • We want to run the affinity pod on the same node as pod B same node = topology. Topology for node is host name and we want to run antiaffinity pod on the different node
  • Refer Here for the specs
  • apply the manifests

node affinity

Taint and toleration

  • Refer Here for official docs
  • Lets apply a taint for node1
kubectl taint nodes aks-nodepool1-19501529-vmss000000 team=devops:NoSchedule
  • Lets create two pods one with toleration and other without toleration
  • Refer Here for manifests
  • Note: We can try Priority class to assign pods a priority

Persistent Volumes in Kubernetes

  • Kuberenetes implements Storage as CSI. There are lots of vendors who provide CSI implementations Refer Here
  • The interaction with storage is done by CSI
  • k8s interacts with CSI to deal with storage
  • This option enables dynamic provisioning also
  • In managed k8s we have storage classes
  • We can initiate a request from pod for a PersistentVolume (PV) which is referred as Persistent Volume Claim (PVC)
  • Lets create a mysql pod with a Persistent volume
  • Lets create pvc and apply
  • Lets apply the pod with pvc


  • Connect to database and insert some records
  • Now lets delete the pod and recreate the pod by applying the manifest
  • Refer Here
  • To statically provision volume Refer Here
  • Refer Here for reclaim policy
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%