5 exercises — Pod lifecycle phases, Service types (ClusterIP/NodePort/LoadBalancer), RBAC (Role/ClusterRole/ServiceAccount), PV/PVC/StorageClass storage model, and Pod Security Standards.
0 / 14 completed
1 / 14
A runbook entry says: "Pod stuck in Pending state — likely a scheduling constraint or resource quota issue." What is the Kubernetes Pod lifecycle, and what does each state mean?
Kubernetes Pod lifecycle vocabulary:
Pod phases: • Pending — Pod accepted by the API server but not yet on a Node. Causes: insufficient CPU/memory on all nodes, image pull in progress, node selector / affinity rules not satisfied, PVC not bound • Running — Pod bound to a Node; at least one container is running (or starting/restarting) • Succeeded — all containers completed successfully (exit code 0); terminal state; used for Jobs • Failed — all containers have stopped; at least one exited with non-zero code or was killed; terminal state • Unknown — Pod state could not be determined; usually means the Node is unreachable
Container states within a Pod: • Waiting — not yet running (pulling image, waiting for dependencies) • Running — executing • Terminated — finished; exit code recorded
Diagnosing a stuck Pending Pod: kubectl describe pod <name> → look at the Events section for scheduler messages Common messages: "0/3 nodes are available: 3 Insufficient memory", "did not match Pod's node affinity/selector"
Advanced Pod vocabulary: • init container — runs to completion before app containers start; used for setup tasks (DB schema check, secret download) • sidecar container — runs alongside the main container in the same Pod (log shipper, proxy, secrets injector) • ephemeral container — injected into a running Pod for debugging (no restart, no probes) • restart policy — Always (default), OnFailure, Never • Pod Disruption Budget (PDB) — minimum available replicas during voluntary disruptions (node drains)
2 / 14
An architecture review asks: "Should this service use a ClusterIP, NodePort, or LoadBalancer Service?" What is the difference?
Kubernetes Service types vocabulary:
ClusterIP (default) Creates a stable virtual IP accessible only within the cluster. Used for service-to-service communication. • DNS: my-service.my-namespace.svc.cluster.local • Not reachable from outside the cluster
NodePort Extends ClusterIP by also opening a port (30000-32767) on every Node. External traffic can reach the service at <NodeIP>:<NodePort>. • Used for development/testing or on-prem without a cloud load balancer • Not production-ready for internet-facing services (exposes all nodes, requires firewall rules)
LoadBalancer Extends NodePort by also provisioning a cloud provider Load Balancer (AWS ALB/NLB, GCP Forwarding Rule, Azure Load Balancer). Gets an external IP from the cloud. • Standard for production internet-facing services • Each LoadBalancer service creates one cloud LB (can be expensive; Ingress is often preferred)
ExternalName Maps a service to a DNS name (e.g., an external database). No proxying — pure DNS CNAME.
Headless Service clusterIP: None — does not create a virtual IP. DNS returns the IPs of individual Pod endpoints. Used for stateful workloads (StatefulSet) and service discovery.
Ingress An API object that manages external HTTP/HTTPS access to services, with path-based and host-based routing, TLS termination. Requires an Ingress Controller (nginx, Traefik, AWS ALB Ingress Controller).
Vocabulary: • kube-proxy — maintains iptables rules for Service VIP routing on each Node • Endpoints / EndpointSlice — the actual Pod IPs backing a Service • NodePort range — 30000-32767 (configurable) • port / targetPort / nodePort — three port fields in a Service spec
3 / 14
A security review comments: "The application Pod should use a ServiceAccount with the minimum RBAC permissions — not the default ServiceAccount." What is RBAC in Kubernetes and why does this matter?
Kubernetes RBAC vocabulary:
RBAC controls who can do what to which resources in Kubernetes.
Core RBAC objects:
Role — grants permissions within a single namespace kind: Role
rules:
- apiGroups: [""]
resources: ["pods"]
verbs: ["get", "list"]
ClusterRole — grants permissions cluster-wide (or for non-namespaced resources like Nodes)
RoleBinding — attaches a Role to a subject (User, Group, or ServiceAccount) within a namespace ClusterRoleBinding — attaches a ClusterRole cluster-wide
ServiceAccount — an identity for Pods. Every Pod runs as a ServiceAccount. Tokens are mounted automatically into the Pod filesystem at /var/run/secrets/kubernetes.io/serviceaccount/.
Subjects: • User — a human user (managed externally to Kubernetes — via certificates, OIDC) • Group — a set of users • ServiceAccount — an in-cluster identity for Pods
Principle of least privilege: Create dedicated ServiceAccounts for each application with only the permissions they need. Never use the default ServiceAccount for production workloads or bind ClusterAdmin to application ServiceAccounts.
Diagnostics: kubectl auth can-i list pods --as=system:serviceaccount:my-ns:my-sa — check what a ServiceAccount can do
Vocabulary: • verbs — allowed API actions: get, list, watch, create, update, patch, delete • resources — Kubernetes objects: pods, services, deployments, secrets, configmaps… • apiGroups — "" = core API; "apps" = Deployments; "batch" = Jobs • impersonation — acting as another user/ServiceAccount for debugging
4 / 14
A developer asks: "Why do I need a PersistentVolumeClaim if the PersistentVolume already exists?" What is the PV/PVC bind model and what does StorageClass add?
Kubernetes storage vocabulary:
PersistentVolume (PV) A cluster-level representation of physical storage. Provisioned by an admin (or dynamically by a StorageClass). Has a lifecycle independent of any Pod. Properties: capacity, access mode, reclaim policy, storage class.
PersistentVolumeClaim (PVC) A user's request for storage — specifies the size and access mode required. Kubernetes finds (or creates) a matching PV and binds the PVC to it. The Pod then mounts the PVC as a volume.
Access modes: • ReadWriteOnce (RWO) — mounted read-write by a single Node • ReadOnlyMany (ROX) — mounted read-only by multiple Nodes • ReadWriteMany (RWX) — mounted read-write by multiple Nodes (requires NFS or similar) • ReadWriteOncePod (RWOP) — mounted read-write by a single Pod (Kubernetes 1.22+)
StorageClass Defines the type of storage and enables dynamic provisioning. When a PVC references a StorageClass, the CSI (Container Storage Interface) driver creates a PV automatically.
Common StorageClasses: gp2 / gp3 (AWS EBS), standard (GCP), managed-premium (Azure)
Reclaim policy: • Retain — PV keeps data after PVC deletion; requires manual cleanup • Delete — PV and underlying storage deleted when PVC is deleted (default for dynamic provisioning) • Recycle — deprecated
StatefulSet + PVC: StatefulSets use volumeClaimTemplates to create a dedicated PVC per replica — each Pod gets its own persistent storage.
Vocabulary: • bound — PVC successfully matched to a PV • CSI driver — Container Storage Interface plugin (AWS EBS CSI, Ceph CSI, etc.) • volume snapshot — point-in-time copy of a PVC • emptyDir — temporary ephemeral storage shared between containers in a Pod; deleted when Pod terminates
5 / 14
A security audit requires: "All Pods must run as non-root and with a read-only root filesystem." The team implements a Pod Security Standard. What are the three PSS levels and what does "Restricted" enforce?
Pod Security Standards (PSS) vocabulary:
PSS replaced PodSecurityPolicy (PSP, deprecated in 1.21, removed in 1.25). Applied at the namespace level via labels — every Pod in that namespace is evaluated.
Three levels:
Privileged No restrictions. Intended for trusted system-level workloads (kernel modules, monitoring agents that need host access).
Baseline Prevents known privilege escalation techniques while remaining broadly compatible with existing workloads: • No privileged containers • No host network/PID/IPC namespaces • No hostPath volumes • Allowlisted capabilities (no AppArmor/Seccomp overrides)
Restricted Maximally hardened, following current Pod security best practices: • All Baseline restrictions + • runAsNonRoot: true — container must not run as root (UID 0) • readOnlyRootFilesystem: true — no writes to container filesystem • allowPrivilegeEscalation: false • Drop all Linux capabilities; only add specific ones if needed • Seccomp profile required (RuntimeDefault or Localhost) • runAsUser must be a high UID (not 0)
How to apply (namespace label): kubectl label namespace my-app \ pod-security.kubernetes.io/enforce=restricted \ pod-security.kubernetes.io/enforce-version=latest
Vocabulary: • runAsNonRoot — Pod security context field — container cannot run as UID 0 • readOnlyRootFilesystem — no writes to the container's root filesystem (write to tmpfs or volumes instead) • allowPrivilegeEscalation — whether a process can gain more privileges than its parent (setuid programs) • seccomp — Linux kernel syscall filter; RuntimeDefault blocks unusual syscalls • capabilities — fine-grained Linux permissions; ALL drops all; add back only what is needed
6 / 14
Alex (Lead Developer) sends a Slack message: "Hey team, we're seeing high CPU usage on the backend-service Pod. Should we scale it up immediately or investigate further?"
This scenario tests practical response in a real-time communication context. Scaling without investigation can mask underlying problems and potentially waste resources. It's crucial to understand the cause of high CPU usage before scaling, as simply adding more capacity won't fix inefficient code or resource leaks. The correct answer prioritizes a systematic approach.
7 / 14
You're reviewing a PR that deploys a new application. The PR description reads: "Deploying the frontend-app to production using a Kubernetes Service of type NodePort. This allows external access via port 8080 on any node in the cluster."
This focuses on a common deployment scenario. While NodePorts *can* provide external access, they are generally considered less secure than LoadBalancers and expose your application directly to all nodes in the cluster. Using a NodePort for production is often discouraged due to potential security vulnerabilities and limited control over routing.
8 / 14
During a standup meeting, Sarah (DevOps Engineer) says: "We're seeing instances where new deployments aren't automatically rolling back when health checks fail. We need to ensure that Kubernetes can detect unhealthy pods and trigger a rollback."
This explores the role of readiness probes. The 'readinessProbe' is critical for determining pod health; if it fails, the pod isn't considered ready to receive traffic. Kubernetes uses this information along with other factors (like the `rollingUpdate` strategy) to manage deployments and rollbacks effectively.
9 / 14
You're investigating why a deployment isn't scaling down after a period of inactivity. The monitoring system shows that the Pods are still running, but no new ones are being created. A colleague explains: "We need to configure HorizontalPodAutoscaler (HPA) with metrics server and set the target CPU utilization."
This focuses on a key scaling mechanism. The HorizontalPodAutoscaler (HPA) relies on metrics (like CPU or memory) to determine when to scale up or down. The 'metrics server' is the component that provides this information to the HPA, enabling dynamic resource adjustments for optimal performance and cost efficiency.
10 / 14
Mark (DevOps Engineer) sends a Slack message: 'The deployment is failing with an error related to 'imagePullBackOff'. We suspect a problem with the Docker image registry. What does 'imagePullBackOff' typically indicate in Kubernetes?', Hint: Consider the steps involved in pulling an image.
'imagePullBackOff' signifies that Kubernetes attempted to pull an image but failed. This most commonly happens when there's no network connection between the node and the registry or if the specified tag doesn't exist. Options B and C describe potential issues within the image itself; option D relates to resource constraints, not the pull process directly.
11 / 14
During a troubleshooting session, David (Developer) says: 'I'm seeing events about 'FailedScheduling' for my application Pod. I've increased the memory requests but it still fails. What is the primary cause of this error?', Hint: Think about what Kubernetes needs to determine where to run a pod.
'FailedScheduling' errors arise when Kubernetes cannot find a suitable node to run the Pod based on its resource requests. This happens if the combined CPU and memory requests exceed what any node can offer. While CPU limitations can cause problems, it's the exceeding of *total* requested resources that triggers this specific error message.
12 / 14
You're reviewing a PR description for a new deployment: 'This Service is exposed using a LoadBalancer. This provides external access via the public internet and automatically handles routing traffic to the Pods.' What key advantage does using a LoadBalancer Service provide, compared to other service types?', Hint: Consider ease of access.
The primary advantage of a LoadBalancer Service is its ability to seamlessly expose an application externally. This is achieved through integration with cloud providers that automatically manage routing and IP address assignment – eliminating the need for manual port mapping or configuring external IPs. Options A, C, and D describe features of other service types.
13 / 14
Emily (Security Engineer) reports: 'I've identified a Pod running with the root user. This is a significant security risk!'. What does it mean for a Kubernetes Pod to run as 'root', and why is this considered problematic?', Hint: Think about least privilege.
Running a Pod as 'root' means it has elevated privileges and can potentially damage the host node or compromise other applications. This significantly increases the attack surface because if one component is compromised, an attacker gains access to root-level control on the node. Best practice dictates running pods with minimal privileges – the principle of least privilege.
14 / 14
During a team discussion, John (Senior Developer) asks: 'We need to ensure our application Pods can persist data even if the node restarts. How do we achieve this?' Considering available options, what is the most flexible approach for managing persistent storage in Kubernetes?', Hint: Consider how you define your storage needs.
The PVC/PV bind model provides the most flexible and Kubernetes-native approach to persistent storage. A PVC represents the *request* for storage, while a PV is the actual storage resource (e.g., an EBS volume). This allows you to abstract away the underlying storage implementation details, making it easier to manage and scale your applications.
Docker Compose— useful for Containers & orchestration (DevOps & Cloud)
Frequently Asked Questions
What does the "Kubernetes — Deep Dive Vocabulary" vocabulary exercise cover?
This exercise tests real IT vocabulary related to kubernetes — deep dive vocabulary through 14 multiple-choice questions, each built from realistic workplace sentences rather than abstract definitions.
Is this vocabulary exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is completely free — no account, sign-up, or payment required.
How many questions does this exercise have?
This exercise has 14 questions. Each one shows a real-world sentence or scenario with multiple-choice options and an explanation once you answer.
What happens after I answer a question?
You'll see immediate feedback showing whether your answer was correct, along with a short explanation of why — then a button to move to the next question, and a full results screen at the end.
Can I retry the exercise if I get questions wrong?
Yes. Once you reach the results screen, click "Try again" to reset your answers and go through the exercise from the start as many times as you like.
Do I need to create an account to take this exercise?
No account is needed. Your answers are scored in your browser during the session — nothing is saved to a server, so you can jump straight in.
Is my progress saved if I leave the page?
No — progress within an exercise resets if you navigate away or reload. Each exercise is short enough to complete in a few minutes in one sitting.
Are these vocabulary exercises connected to other topics?
Yes — this module shares real-world context with 2 other vocabulary modules. See "Related vocabulary" below to keep building a connected skill set.
How is this different from reading a glossary or blog article?
Exercises like this one are active recall drills — you have to choose the correct term or phrasing yourself, which builds retention faster than passively reading a definition.
Where can I find more vocabulary exercises?
Browse the full Vocabulary exercises hub for hundreds of modules covering Agile, DevOps, security, databases, architecture, and more — organised by IT role and skill.