Pcornel
Browse topics
Options
Recent
Favorites
Containers · Technical reference

Kubernetes Configuration & Storage

Direct answer

Kubernetes configuration and storage: ConfigMaps and Secrets inject configuration as environment variables or files; PersistentVolumeClaims request storage that a StorageClass/CSI driver provisions.

When to use this

Use it when a pod is missing configuration, secrets, or its volume.

First 30 seconds

1. kubectl describe pod — mount or configmap/secret not found errors?

2. kubectl get cm,secret -n <ns> — exist?

3. kubectl get pvc — Bound?

4. Changed config → kubectl rollout restart deploy/<name>.

5. Inside: check file/env.

Operational verification

ConfigMap/Secret/PVC created → referenced by pod → mounted/injected at start

Evidence · next step

Failures include stale projected configuration, missing keys, base64 mistaken for encryption, PVCs stuck Pending, access-mode/topology conflicts, reclaim-policy surprises and application permissions that fail after a volume successfully mounts. Preserve the first divergent observation and repeat the same bounded verification after remediation.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
What not to infer

Containers owns Kubernetes configuration/storage objects and binding semantics. Security owns secret governance; Storage owns the underlying storage system and durability characteristics.

Platform / version applicability
Docker / containerd / Podman / Kubernetes / OCI-compatible platforms
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformDocker / containerd / Podman / Kubernetes / OCI-compatible platforms · Containers owns Kubernetes configuration/storage objects and binding semantics. Security owns secret governance; Storage owns the underlying storage system and durability characteristics.
Scope / prerequisiteUse it when a pod is missing configuration, secrets, or its volume.
What next?3 suggested next steps
Child topics (this level)2
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

2 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification workflow Verify boundary

Resolve the exact ConfigMap/Secret/PVC referenced by the workload, verify namespace and key names, inspect mount/environment projection, then check PVC binding, StorageClass/provisioner events, access modes and the application write path. Validate replacement/restart behavior after changes.

Step 2 Failure signatures and limits Narrow the fault

Failures include stale projected configuration, missing keys, base64 mistaken for encryption, PVCs stuck Pending, access-mode/topology conflicts, reclaim-policy surprises and application permissions that fail after a volume successfully mounts.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

test · 1
Drill down

Subtopics

Go one level deeper into this subject.

Key points

Env vars from ConfigMaps are read at start — restart pods after changes; mounted files update eventually. Secrets are only base64-encoded; enable encryption at rest and RBAC. PVCs must be Bound before pods can start.

Key checks
  • kubectl get cm,secret -n <ns> — first check for this topic
  • kubectl get pods -o wide — pods, status, node, IP
  • kubectl describe pod <pod> — events and conditions
  • kubectl logs <pod> [-c <c>] [--previous] — container logs (incl. previous crash)
  • kubectl get events --sort-by=.lastTimestamp — recent cluster events
ReferenceWhat it is1 section · depth on demand

Operating model

Kubernetes Configuration & Storage covers how non-image configuration and persistent storage are presented to workloads. ConfigMaps and Secrets are API objects consumed as environment or files; PV/PVC/StorageClass objects negotiate persistent volumes and lifecycle independently of Pod replacement.

ReferenceHow it works1 section · depth on demand

In depth

Kubernetes configuration and storage objects separate application code from its settings and data. ConfigMaps hold non-secret configuration, Secrets hold sensitive values, and PersistentVolumeClaims request storage that survives pod restarts.

ObjectUseNotes
ConfigMapConfig files, environment variablesChanges to mounted files propagate; env vars need pod restart
SecretPasswords, tokens, certificatesBase64 only — enable encryption at rest, restrict RBAC
PersistentVolumeClaimRequest storageBound to a PV, often dynamically provisioned
StorageClassDefines storage type and provisionerReclaim policy, expansion, binding mode
VolumeSnapshotCSI snapshotsBackup building block
kubectl create configmap app-config --from-file=config.yaml -n apps
kubectl get pvc -n apps
kubectl describe pvc data-db-0 -n apps

Keep configuration in Git (Kustomize/Helm values) and secrets in an external store (External Secrets Operator, Sealed Secrets) for GitOps workflows.

ReferenceImportant terms & boundaries1 section · depth on demand

Scope map

  • ConfigMap
  • Secret mechanics and boundaries
  • PersistentVolume / PersistentVolumeClaim
  • StorageClass
  • Access modes
  • Dynamic provisioning
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Kubernetes Kubernetes 1.28 or laterConfigMap as environment plus a PersistentVolumeClaim for data.

Assumptions: A default StorageClass exists. Replace sizes and keys.

apiVersion: v1
kind: ConfigMap
metadata: {name: api-config}
data:
  LOG_LEVEL: info
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata: {name: api-data}
spec:
  accessModes: [ReadWriteOnce]
  resources:
    requests: {storage: 5Gi}

Expected output

Kubernetes Kubernetes 1.28 or laterkubectl get pvc api-data

Expected state: The claim is Bound to a volume with the requested size and access mode.

NAME       STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS   AGE
api-data   Bound    pvc-5b1e2c7a-91d4-4f0e-8c3a-2d6b7e9f1a04   5Gi        RWO            standard       2m
Pending usually means no matching StorageClass or a WaitForFirstConsumer class waiting for a Pod. ConfigMap changes are not seen by running Pods that read them as environment variables until restart. Illustrative authored output: field layout matches the tool, values will differ in your environment.
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-29 · otherOCI / Docker / containerd / Kubernetes Kubernetes current documentation

Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.

Basis: https://kubernetes.io/docs/concepts/storage/ · confidence 92%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
kubernetes configuration & storageKubernetes ConfigMap SecretPersistentVolume PVCStorageClass Kubernetes
Embedded reference data

Quick lookup tables

Kubernetes Configuration & Storage verification boundary matrix

A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Kubernetes Configuration & Storage.

BoundaryInspectHealthy interpretationDo not infer
IntentConfigMapIntended object/scope is explicit and versioned where relevantIntent is already effective
Owning runtime/control planeSecret mechanics and boundaries / PersistentVolume / PersistentVolumeClaimOwner accepts and reports the expected object stateDownstream dependencies are healthy
Effective stateStorageClassIndependent read-back matches the intended stateEvery client sees the same result
Consumer outcomeAccess modesThe original bounded check succeeds in the same time windowProduction correctness outside this scope
Depth when you need it

Deep reference

Design & tradeoffs

Scope

Containers owns Kubernetes configuration/storage objects and binding semantics. Security owns secret governance; Storage owns the underlying storage system and durability characteristics.

Confirmation

Confirm action

Continue?