Skip to content
CKADApplication Observability and MaintenanceSingle nodeEasy

Logs, label selectors and custom output to files

Scenario ckad-obs-003 · about 7 minutes · 6 points · 6 grader checks

Collect container logs and produce label-filtered and custom-column kubectl output into answer files.

  • logs
  • jsonpath
  • custom-columns
  • labels
  • kubectl-output

What you will practise

  • Read container logs with kubectl logs -c
  • Filter objects with label selectors
  • Format kubectl output with -o custom-columns, -o jsonpath and --sort-by

Start this lab

With the CLI installed and signed in, this command provisions a single node cluster on your Mac, applies the scenario setup and prints the task below.

goldenkube start ckad-obs-003

Task

The task text exactly as the CLI shows it. Solve it on the cluster, then run goldenkube submit.

Namespace "observe" runs the Pods "emitter", "api-1", "api-2" and "web-1". Work on the control plane node exam-cp1 and write these files into the existing directory /opt/answers: 1. /opt/answers/emitter.log — the complete logs of the container "main" of Pod "emitter". 2. /opt/answers/backend-pods.txt — the names of all Pods in "observe" that carry the label tier=backend, one name per line, nothing else. 3. /opt/answers/images.txt — a table of every Pod in "observe" with exactly two columns, a header line "NAME IMAGE" and one line per Pod (the Pod name and the image of its first container), sorted by Pod name. 4. /opt/answers/node.txt — the name of the node Pod "emitter" runs on.

Requirements and details

Certification
CKAD · Certified Kubernetes Application Developer
Domain
Application Observability and Maintenance
Difficulty
Easy
Cluster topology
Single node
Cluster features
None beyond the base cluster
Recommended time
7 minutes
Points
6
Grader checks
6
Kubernetes version
1.37
Minimum CLI version
0.1.0
Scenario version
1
Published

Grading runs locally: 6 state checks read your cluster when you submit; the scenario passes when every check passes. Hints, the reference solution and the check definitions are available only inside the CLI, not on this page.

CKADApplication Observability and MaintenanceEasy

Readiness and liveness probes

Add HTTP readiness and TCP liveness probes with specific timings to a running Deployment.

Single node · ~7 min · 10 points

  • probes
  • readiness
  • liveness
  • health-checks
  • deployment

goldenkube start ckad-obs-001

CKADApplication Observability and MaintenanceMedium

Troubleshoot a Deployment that never becomes Ready

Use events, pod status and describe output to find and fix why a Deployment's pods never become Ready.

Single node · ~8 min · 8 points

  • troubleshooting
  • debugging
  • deployment
  • events
  • probes

goldenkube start ckad-obs-002

Independent community project, not affiliated with or endorsed by CNCF or The Linux Foundation. Lab results are practice feedback, not an exam score.