Kubernetes Assessment: 02 Intermediate
Difficulty level: Intermediate
Language: English
Format: combined concept, design and hands-on assessment
Recommended duration: 150 to 180 minutes
Maximum score: 100 points
Passing threshold: 70 points
This assessment contains tasks, submission requirements and grading criteria. It does not contain the full model solution.
1. Assessment Goal
This assessment verifies that you can model, configure and debug Kubernetes workloads that are closer to production. The focus is on workload selection, probes, lifecycle, resource management, scheduling, NetworkPolicy, DNS, Ingress or Gateway API, storage, Helm, Kustomize and systematic troubleshooting.
After the assessment it should be clear that you can:
- distinguish Deployment, StatefulSet, DaemonSet, Job and CronJob by purpose,
- classify Init Containers, Sidecar Containers and Ephemeral Containers correctly,
- separate Startup, Readiness and Liveness Probes technically,
- apply Requests, Limits, QoS, LimitRange and ResourceQuota,
- explain scheduling problems through events, node labels, taints and tolerations,
- diagnose Service, DNS, EndpointSlices and NetworkPolicies separately,
- understand Ingress and Gateway API as rule resources plus controllers,
- handle PVC, PV, StorageClass and StatefulSet at a basic level,
- review Helm and Kustomize output before applying it.
2. Prerequisites and Allowed Resources
You need:
- a lab cluster with a working CNI,
- CoreDNS,
kubectl,- optionally
helm, - optionally
kubectl kustomizeorkustomize, - optionally a StorageClass,
- optionally an Ingress Controller or Gateway Controller.
Allowed resources:
- official Kubernetes documentation,
- your own workshop notes,
kubectl explain,kubectl describe,kubectl logs,kubectl get events,- local manifests created during the assessment.
Not allowed:
- production Secrets,
- changes outside the assessment namespace unless explicitly required,
- cluster-wide changes without documentation and rollback.
Recommended namespace:
export NS=exam-intermediate
3. Scenario
A team runs a small shop application in the lab. The application consists of:
frontend: accepts HTTP requests,backend: provides an internal API on port8080,migration: runs once before a new version,cleanup: runs regularly,data-demo: stores a small file persistently.
The application must receive controlled health checks, resource requirements, namespace boundaries, NetworkPolicies and clean diagnosis. External publication is done through Ingress or Gateway API if a controller is available. If no controller is available, this must be documented correctly.
4. Expected Submission
Submit a folder or archive with the following files:
02-intermediate-submission/
answers.md
architecture-decision.md
workloads/
frontend.yml
backend.yml
migration-job.yml
cleanup-cronjob.yml
resources/
limitrange.yml
resourcequota.yml
networking/
services.yml
networkpolicies.yml
ingress-or-gateway.yml
storage/
statefulset.yml
packaging/
kustomize-output.md
helm-output.md
troubleshooting.md
evidence.md
cleanup.md
If Helm, Gateway API, an Ingress Controller or a StorageClass is not available, document the limitation and provide a technically correct example manifest or a traceable alternative assessment.
5. Part A: Knowledge Questions
Answer the questions precisely and with operational context.
- When do you use a Deployment, StatefulSet, Job and CronJob?
- What distinguishes Init Containers, Sidecar Containers and Ephemeral Containers?
- What is the role of Startup Probe, Readiness Probe and Liveness Probe?
- Why can an overly aggressive Liveness Probe cause damage?
- What effect do CPU/Memory Requests have on scheduling and HPA?
- What is the difference between
Guaranteed,BurstableandBestEffortQoS? - What is the role of LimitRange and ResourceQuota?
- What is the difference between
nodeSelector, affinity, taints and tolerations? - Why can a Pod remain
Pendingeven if the manifest is correct? - How do Service, EndpointSlice, Pod readiness and DNS interact?
- Why must DNS egress be considered explicitly in default-deny NetworkPolicies?
- What is the difference between an Ingress resource and an Ingress Controller?
- What roles do PV, PVC, StorageClass and CSI have?
- Why is
hostPathin a lab not automatically a production solution? - What do you check for
PVC Pending, a Service without Endpoints andCreateContainerConfigError?
6. Part B: Workload and Architecture Decision
Create architecture-decision.md. For each requirement, describe the suitable Kubernetes resource and justify the decision.
| Requirement | Expected decision |
|---|---|
| HTTP frontend should run continuously and be updated through rolling updates | justify resource type |
| Backend API needs health checks and Requests/Limits | explain probes and resources |
| Data migration should run exactly once per release | justify resource type |
| Cleanup should run hourly and not create parallel jobs | explain resource type and concurrency |
| Small stateful workload should keep data after Pod recreation | explain StatefulSet/PVC |
| Application should be externally reachable | explain Ingress or Gateway API plus controller dependency |
| Namespace should be protected from overuse | explain LimitRange and ResourceQuota |
| Frontend may reach only backend and DNS | explain NetworkPolicy design |
7. Part C: Practical Tasks
Task C1: Namespace, quota and LimitRange
- Create namespace
exam-intermediate. - Create a LimitRange with default Requests and Limits.
- Create a ResourceQuota for Pods, CPU and Memory.
- Show that an oversized Pod is rejected by the API Server.
Minimum quota requirements:
pods: 10
requests.cpu: 2
requests.memory: 2Gi
limits.cpu: 4
limits.memory: 4Gi
Task C2: Frontend and backend with probes
Create two Deployments:
frontendwith imagecurlimages/curl:8.8.0or a comparable safe test image,backendwith an HTTP test server on port8080, for exampleregistry.k8s.io/e2e-test-images/agnhost:2.53withnetexec.
Requirements:
- meaningful CPU/Memory Requests and Limits,
- Readiness Probe for Service traffic,
- Liveness Probe for actual restart cases,
- Startup Probe if the application starts slowly,
- clear labels:
app,component,environment, - Services for frontend and backend.
Document why Readiness does not serve the same purpose as Liveness.
Task C3: Job and CronJob
Create:
- a Job
migrationthat completes successfully once, - a CronJob
cleanupthat runs hourly, concurrencyPolicy: Forbidfor the CronJob,- meaningful
successfulJobsHistoryLimitandfailedJobsHistoryLimit.
Document why a Deployment would be technically worse for this purpose.
Task C4: Check scheduling
- Label a lab node with
exam-role=apps. - Create a Pod or Deployment with a matching
nodeSelector. - Create a second Pod with a non-matching
nodeSelector. - Document the
Pendingevents. - Set a taint on the labelled node.
- Show the difference between a Pod without a toleration and a Pod with a matching toleration.
- Cleanly roll back the node changes.
Task C5: NetworkPolicy default deny plus targeted allowances
Create NetworkPolicies with these requirements:
- Default deny for Ingress and Egress in the namespace.
- Allow DNS egress to CoreDNS.
frontendmay reachbackendon TCP port8080.- Other egress remains blocked.
- Document whether your CNI actually enforces NetworkPolicies.
Evidence:
kubectl get networkpolicy -n exam-intermediate
kubectl exec <frontend-pod> -n exam-intermediate -- nslookup backend
kubectl exec <frontend-pod> -n exam-intermediate -- curl -s --max-time 5 http://backend:8080/hostname
Task C6: Ingress or Gateway API
First check whether a controller is available:
kubectl get ingressclass
kubectl get gatewayclass 2>/dev/null || true
If an Ingress Controller is available:
- create an Ingress resource with hostname
shop.localtest.me, - route to the correct Service,
- document controller events and backend mapping.
If Gateway API is available:
- create or describe a Gateway/HTTPRoute model,
- document ParentRef, hostname and BackendRef.
If no controller is available:
- create an example manifest,
- explain why the resource has no practical routing effect without a controller.
Task C7: PVC and StatefulSet
- Check available StorageClasses.
- Create a StatefulSet
data-demowithvolumeClaimTemplates. - Write a file to
/data/test.txt. - Delete the Pod.
- After recreation, verify that the file still exists.
- Document the StorageClass and the limits of the lab.
Task C8: Render Helm and Kustomize
- Create a small Kustomize base and a
devoverlay. - Render the overlay with
kubectl kustomize. - Create a minimal Helm chart or use a local example chart.
- Render the chart with
helm template. - Compare reviewability, parameterization and error risk.
8. Part D: Troubleshooting Course
Investigate five error patterns. For each pattern document symptom, diagnosis, cause, fix and validation.
| Error pattern | Minimum diagnosis |
|---|---|
Pod remains Pending because of wrong nodeSelector |
kubectl describe pod, scheduling events |
ImagePullBackOff because of wrong image tag |
Pod events, image name and tag |
CrashLoopBackOff because of wrong startup command |
kubectl logs, kubectl logs --previous, exit code |
PVC remains Pending because of wrong StorageClass |
kubectl describe pvc, StorageClass, events |
| Service has no Endpoints because of wrong Selector | Labels, Selector, Endpoints, EndpointSlices |
9. Grading
| Area | Points | Expectation |
|---|---|---|
| Knowledge questions | 20 | Terms and operational impact explained correctly |
| Architecture decision | 15 | Resource choice and alternatives justified traceably |
| Workload configuration | 20 | Probes, resources, Jobs, CronJobs and Labels implemented meaningfully |
| Network, DNS, Ingress/Gateway | 15 | Service path and controller dependency understood |
| Storage, Helm and Kustomize | 10 | PVC/StatefulSet and rendering path handled correctly |
| Troubleshooting | 15 | Errors isolated methodically through status, events and logs |
| Documentation and cleanup | 5 | Submission reproducible and cleanup documented |
| Total | 100 |
10. Knockout Criteria
The assessment fails regardless of point score if:
- production resources or Secrets are used,
- cluster-wide changes are left behind without documentation,
- node taints or labels are not rolled back,
- the submission contains no evidence for the hands-on steps,
- the candidate cannot explain the difference between Readiness and Liveness,
- the candidate cannot diagnose a Service without Endpoints.
11. Examiner Checklist
- Namespace, LimitRange and ResourceQuota exist and are documented.
- Frontend and backend have meaningful probes and resources.
- Job and CronJob are used for finite and scheduled work.
- Scheduling tests include node label, wrong selector, taint and toleration.
- NetworkPolicies include default deny, DNS and app allowance.
- Ingress/Gateway controller dependency is correctly classified.
- StatefulSet/PVC persistence is validated or limitation is explained.
- Helm/Kustomize output is rendered before apply.
- Troubleshooting documentation contains symptom, diagnosis, cause, fix and validation.