Course outline▾
Week 1 · The Foundations
- Day 1Demystifying AI — From Buzzword to Business Logic
- Day 2How Machines Actually Learn — Supervised, Unsupervised and Reinforcement Learning
- Day 3Inside Neural Networks — The Engine of Modern Deep Learning
- Day 4The AI Project Lifecycle — From Raw Data to Production Deployment
- Day 5The Math Behind the Magic — Why Linear Algebra and Probability Matter
- Day 6Data Preprocessing — Cleaning the Messy Reality of Enterprise Data
- Day 7Measuring Success — Understanding Accuracy, Precision, Recall and F1 Scores
Week 2 · Applied AI & APIs
- Day 8Introduction to LLMs & The Modern AI API Landscape
- Day 9Advanced Prompt Engineering — Few-Shot, Chain-of-Thought and Structured JSON
- Day 10Tokenization, Context Windows and Cost Optimization
- Day 11Embeddings and Vector Representations — How Machines Map Meaning
- Day 12Vector Databases — Storing and Searching Enterprise Knowledge
- Day 13Retrieval-Augmented Generation (RAG) — Chatting with Proprietary Documents
- Day 14RAG Evaluation and Hallucination Guardrails
Week 3 · Infrastructure & Hosting
- Day 15Introduction to AI Infrastructure — Hardware, Runtimes and Compute
- Day 16Local Model Execution — Running Open-Weight LLMs Securely with Ollama and vLLM
- Day 17Containerizing AI Workloads — Production Dockerfiles for Python APIs
- Day 18Docker Compose for Multi-Container AI Stacks
- Day 19Kubernetes for AI 101 — Pods, Deployments and Services for Model Serving
- Day 20Persistent Storage in Kubernetes — Managing State, Weights and Vector Indices
- Day 21High-Performance Networking: Configuring Ingress and Egress for AI ClustersComing soon · 2026-10-21 · 7 PM IST
Week 4 · Enterprise Workflows
- Day 22Autonomous Agents: From Passive LLMs to Goal-Driven ExecutionComing soon · 2026-10-22 · 7 PM IST
- Day 23Tool Use & Function Calling: Connecting LLMs to APIs, Databases, and ShellsComing soon · 2026-10-23 · 7 PM IST
- Day 24Multi-Agent Orchestration: Supervisor, Worker, and Evaluator PatternsComing soon · 2026-10-24 · 7 PM IST
- Day 25Automated CI/CD: Automating the Software Lifecycle for AI ModelsComing soon · 2026-10-25 · 7 PM IST
- Day 26Zero-Trust Security for AI: Sandboxing Ephemeral Execution & Model EgressComing soon · 2026-10-26 · 7 PM IST
- Day 27Observability & Tracing for Agentic Systems (Telemetry, Logs, and Metrics)Coming soon · 2026-10-27 · 7 PM IST
- Day 28Human-in-the-Loop Architecture: Machine Second, Human First in PracticeComing soon · 2026-10-28 · 7 PM IST
- Day 29Managing Technical Debt, Drift, and Model Governance in Enterprise ITComing soon · 2026-10-29 · 7 PM IST
- Day 30The 10-Year Horizon: Architecting IT Strategy for the AI-Native EnterpriseComing soon · 2026-10-30 · 7 PM IST
Day 20: Persistent Storage in Kubernetes — Managing State, Weights and Vector Indices
2026-10-20 · 8 min read
Watch the video lesson, or subscribe on YouTube for a new lesson every day.
Containers are ephemeral. When a Pod crashes or Kubernetes moves it, everything on its local disk is gone. For a web server that is fine. For AI it is costly: vector indices take time to rebuild, and model weights are many gigabytes that you do not want to download again every restart.
In plain terms: A container's disk is a whiteboard that gets wiped whenever the room is reassigned. A persistent volume is a filing cabinet in the corridor that every new room can open.
1. The storage abstraction
Kubernetes separates the storage from the application with two resources.
- PersistentVolume (PV): a piece of real storage in the cluster, such as local NVMe disks, an NFS share or a SAN. It records the size, access modes and backing hardware.
- PersistentVolumeClaim (PVC): the application engineer's request for storage. The Pod references the claim, and Kubernetes binds it to a matching volume. Many clusters also have a StorageClass that creates a volume on demand when a claim arrives.
2. Access modes for AI workloads
The access mode decides how Pods may use the volume.
- ReadWriteOnce (RWO): mounted read-write by a single node. This is the usual choice for a stateful vector database such as Milvus or Qdrant, where uncoordinated writers could corrupt the index.
- ReadOnlyMany (ROX): mounted read-only by many nodes at once. This suits model weights: keep one copy of, say, 15 GB of quantized weights on a shared, fast network mount, and let many stateless inference Pods attach to it instead of each holding its own copy.
Check that your storage backend actually supports the mode you ask for. Shared read-only mounts typically come from NFS or a similar network filesystem, while plain block disks are usually single-node.
3. StatefulSets for databases
For a vector database, a standard Deployment is usually the wrong tool. A StatefulSet gives each Pod a stable name (db-0, db-1), starts them in order, and binds each Pod to its own persistent volume that follows it across restarts. That keeps replication between the database Pods consistent through cluster restarts.
Here is an example. It assumes your cluster has a default StorageClass, and the Qdrant image and sizes are illustrative.
# 1. Shared, read-only model weights (needs a backend that supports ReadOnlyMany)
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: model-weights
spec:
accessModes: [ReadOnlyMany]
resources:
requests: { storage: 20Gi }
---
# 2. A vector database with its own volume per Pod
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: qdrant
spec:
serviceName: qdrant
replicas: 1
selector:
matchLabels: { app: qdrant }
template:
metadata:
labels: { app: qdrant }
spec:
containers:
- name: qdrant
image: qdrant/qdrant:v1.9.0 # pin a version you have tested
volumeMounts:
- { name: data, mountPath: /qdrant/storage }
volumeClaimTemplates: # one PVC is created per Pod: data-qdrant-0, ...
- metadata: { name: data }
spec:
accessModes: [ReadWriteOnce]
resources:
requests: { storage: 50Gi }
Done well, this eliminates repeated weight downloads, preserves your database indices and protects the system's memory across cluster updates.
Coming Up Next
Day 21: High-performance networking: ingress and egress for AI clusters.
#KubernetesStorage #DataEngineering #CloudNative #VectorDatabase #StatefulSet