Observability
Use logs, metrics and events to find out what actually happened.
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.
readinessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 3
periodSeconds: 5
livenessProbe:
httpGet:
path: /healthz
port: 8080
initialDelaySeconds: 15
periodSeconds: 10Your turn
MediumAdd a readiness probe
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 inFinished reading?
Lock in what you just learned.
0%
Mark this lesson complete to save your place and move one step closer to the certificate.