Kubernetes·Kubernetes from first pod to production app

Observability

Use logs, metrics and events to find out what actually happened.

Intermediate 14 min read Lesson 9 of 300 Challenge included
What you will be able to do
  • Use kubectl describe and get events first.
  • Use logs with --previous for restarts.
  • Set readiness and liveness probes.
  • Export metrics and alert on symptoms.

In plain English

Kubernetes debugging starts with describe and events, then logs, then metrics. Probes keep unhealthy pods out of service. Use liveness only for deadlocks and readiness for traffic eligibility.

probes.yamlYAML
readinessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 3
  periodSeconds: 5
livenessProbe:
  httpGet:
    path: /healthz
    port: 8080
  initialDelaySeconds: 15
  periodSeconds: 10
Your turn

Add a readiness probe

Medium

Add a readiness probe on /healthz port 8080 every 5 seconds.

YAML · starter
readinessProbe: {}
Check your understanding before moving on.
Knowledge checkQuestion 1

Which probe decides whether a pod should receive traffic?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: Deploy a real app
Lesson 9 of 300 · 0% of course