← CKA: Kubernetes administration and troubleshooting
06 / 13 · 45 MIN

Workload configuration, admission, and capacity

Connect consumed configuration, Pod creation, and available capacity.

Consume configuration without confusing versions

ConfigMaps hold configuration and Secrets are intended for sensitive data. Base64 is not encryption. Access to the object, mounted files, backups, and process still matters.

Distinguish an environment variable obtained at startup from a projected file: an object update does not rewrite an existing process environment. Secret volumes can receive delayed updates, but subPath does not receive that automatic update.

Even when a file changes, the application may need to reread it. Plan rotation with coexistence and revocation of the previous credential while observing which version each consumer uses.

Admission and scheduling are different phases

Quota can reject Pod creation before a Pending Pod exists. Inspect the creator’s error, for example ReplicaSet events, instead of searching for an object never created. An admitted Pod can remain Pending because no node simultaneously satisfies requests, required affinity, taints, volumes, and other constraints.

Free resources spread across nodes do not form one virtual node. Preferred affinity contributes a preference; required affinity excludes nonmatching nodes. A toleration removes a particular barrier without reserving capacity or requiring placement.

Autoscaling as calculation and control

For CPU utilization, compare consumption with the relevant request rather than the limit. In a simplified example with four replicas, complete metrics from ready Pods, 75% mean utilization, and a 50% target, the raw recommendation is ceil(4 × 75/50) = 6. min/maxReplicas, tolerance, missing metrics, readiness, and stabilization policies can limit effective action.

More replicas still require scheduling and capacity. Check HPA conditions and recommendations, available replicas, and client effect; do not declare recovery merely because desiredReplicas increased.

Accept a configuration change

The fragment connects APP_MODE to a ConfigMap and API_TOKEN to a Secret; both reference objects in the Pod namespace. It is a reading fragment to place inside a complete manifest’s container. Before delivery, confirm objects and keys exist and the image expects those names.

In a rollout with maxSurge, account for temporary capacity and quota as well as final state. Keep a recovery strategy compatible with data and the credential still accepted by the service. Investigate a live but unready application through the relevant signal, using the startup/readiness/liveness distinctions taught in the diagnosis lesson.

env:
- name: APP_MODE
  valueFrom:
    configMapKeyRef:
      name: app-settings
      key: mode
- name: API_TOKEN
  valueFrom:
    secretKeyRef:
      name: api-credentials
      key: token
IN PRACTICE

A rotation updates the Secret, but processes using an environment variable retain the previous credential. The replacement rollout creates no Pods because quota is exhausted. Identify both causes, arrange temporary capacity, and revoke the old credential only after observing updated consumers.

Common pitfalls

Confusing encoding with protection; interpreting Pending as admission rejection; summing capacity across nodes for one Pod; treating HPA recommendation as final availability.

Related topics: Kubernetes administration · Diagnosis and recovery

Take this idea with you

Connect consumed version to admission, capacity, and observed effect.

Create account

References

Kubernetes® and CKA are trademarks or registered trademarks of The Linux Foundation. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by The Linux Foundation. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.