Urgent.News

What's breaking now, across thousands of outlets.

Tech

Day 20: Persistent Storage in Kubernetes — Managing State, Weights and Vector Indices

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…

Day 20: Persistent Storage in Kubernetes — Managing State, Weights and Vector Indices

Containers in Kubernetes are transient. When a Pod fails or Kubernetes migrates it, all data on the container's local disk is lost. This is acceptable for typical web servers, but not for artificial intelligence workloads. Vector indices and large model weights take time to reconstruct and are many gigabytes in size, so re-downloading them on every restart is inefficient. To solve this problem, Kubernetes provides persistent storage resources.

Kubernetes separates storage from the application using two resources: PersistentVolume (PV) and PersistentVolumeClaim (PVC). A PV represents a piece of real storage in the cluster, such as local NVMe disks, an NFS share or a SAN. It specifies the size, access modes and backing hardware. A PVC is the application's request for storage. The Pod references the claim, and Kubernetes binds the claim to a matching volume or, if necessary, creates a volume on demand using a StorageClass.

Access modes determine how Pods can use the volume. ReadWriteOnce (RWO) allows mounted read-write access from a single node, making it suitable for stateful vector databases like Milvus or Qdrant, where concurrent writers could corrupt the index. ReadOnlyMany (ROX) permits read-only access from multiple nodes simultaneously, ideal for model weights.

This allows one copy of large weights to serve many inference Pods instead of each Pod having its own copy. It is crucial to verify that your storage backend supports the requested access mode, as shared read-only mounts often come from NFS or similar network filesystems, while plain block disks are typically single-node.

StatefulSets are recommended for AI workloads like vector databases. Unlike Deployments, StatefulSets assign each Pod a stable name and start them in order. Each Pod is bound to its own persistent volume that persists across restarts. This ensures consistent replication between database Pods and prevents data loss during cluster updates.

A StatefulSet example involves a shared, read-only volume for model weights (requiring a backend supporting ReadOnlyMany) and a single Pod for the Qdrant vector database with its own volume per Pod. This setup eliminates repeated weight downloads, preserves vector indices, and protects system memory across cluster updates.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How We Built an Atomic, Sharded Incremental Cache with 57ms Rebuild Times

When building a local-first repository intelligence engine, speed is everything. A cold build on a 100k-file benchmark can take 45 to 55 seconds.

  • TokenCap built atomic sharded incremental cache in src/incremental/cacheManager.js
  • Cache uses content-based SHA-256 checksums for integrity verification
  • Scoped invalidation enables 57ms rebuild time for single file edits

Why my GETs worked but every POST got a 403: a CORS bug behind nginx in Docker

I'm a CS student building a tutoring management system: a Spring Boot REST API, a React frontend and PostgreSQL. While preparing the v1.2 release, I added a Docker Compose setup so anyone could run…

  • Student developed tutoring management system with Spring Boot, React, PostgreSQL.
  • CORS bug behind nginx in Docker caused 403 errors on POST/PATCH, not GET.
  • Fix used $httphost in nginx config to preserve port number and same-origin recognition.

Check who your x402 agent is paying, before it signs

An x402 client pays whatever payTo the server puts in its 402 response. Budget caps answer "how much". Nothing in the default flow answers "to whom".

  • x402-pay-guard tool checks payTo address against OFAC sanctions list
  • Evaluates seller's history and recent wallet payments
  • Integrates via npm package @factline/x402-pay-guard

Ubuntu / Kubuntu 26.04 — Prefer GNU coreutils

GNU coreutils or uutils coreutils? Ubuntu 26.04 ships with both. I prefer to use the GNU coreutils, for several reasons: The uutils are written in Rust and therefore make use of the Rust/Cargo…

  • Ubuntu 26.04 includes both GNU and uutils coreutils packages
  • Author prefers GNU coreutils due to supply chain attack concerns
  • Instructions provided to switch to GNU coreutils on work machines

More from Tuesday 20 October →