DevOps Classroom notes 20/Jan/2026

Storage in kubernetes

  • Storage in k8s revolves around the following concepts
    • volume
    • persistent volume
    • persistent volume claim
    • storage drivers
    • CSI
    • ACCESS Modes
      • RWO
      • RMWO
      • RWM (shared disks)
  • Refer Here for persistent volumes

Preview

  • Prompt Give me the relation between pv, pvc, storage class and csi in a simple manner

Lets create a volume

  • Refer Here
  • Sample manifest for volume (emptyDir)
apiVersion: v1
kind: Pod
metadata:
  name: alpine-pod
  labels:
    app: alpine-demo
spec:
  containers:
    - name: alpine
      image: alpine:latest
      command: ["sh", "-c", "echo 'Hello from Alpine Pod'; sleep 3600"]
      volumeMounts:
        - name: sample-vol
          mountPath: /sample-directory
  volumes:
    - name: sample-vol
      emptyDir: {}

Lets create a Config Map as volume

  • sample
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: mysql-cm
data:
  MYSQL_ROOT_PASSWORD: admin123
  MYSQL_DATABASE: mydb
  MYSQL_USER: myuser
  MYSQL_PASSWORD: mypassword
---
apiVersion: v1
kind: Pod
metadata:
  name: cm-pod
  labels:
    app: alpine-demo
spec:
  containers:
    - name: alpine
      image: alpine:latest
      command: ["sh", "-c", "echo 'Hello from Alpine Pod'; sleep 3600"]
      volumeMounts:
        - name: cm-vol
          mountPath: /cm-demo
  volumes:
    - name: cm-vol
      configMap:
        name: mysql-cm

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

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

Please turn AdBlock off
Plugin for Social Media by Acurax Wordpress Design Studio

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube