_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN
Let's talk

Kubernetes Debugging

02. 05. 2025 1 min read intermediate

Cloud Intermediate

Kubernetes Debugging

KubernetesDebuggingTroubleshooting 3 min read

Jak debugovat problémy v Kubernetes. Kubectl příkazy, events, logs a ephemeral containers.

Základní debugging

# Pod status a events
kubectl describe pod myapp-xyz
kubectl get events --sort-by='.lastTimestamp'

# Logy
kubectl logs myapp-xyz
kubectl logs myapp-xyz --previous  # Po crashloopback
kubectl logs -l app=myapp --all-containers

# Shell do kontejneru
kubectl exec -it myapp-xyz -- sh

# Ephemeral debug container
kubectl debug -it myapp-xyz --image=busybox

Běžné problémy

  • CrashLoopBackOff — kontrola logs –previous
  • ImagePullBackOff — špatný image name nebo registry auth
  • Pending — nedostatek zdrojů (kubectl describe)
  • OOMKilled — zvyšte memory limit

Advanced

# Network debugging
kubectl run debug --image=nicolaka/netshoot -it --rm -- bash
# DNS test
nslookup my-service.default.svc.cluster.local
# Port forward
kubectl port-forward svc/myservice 8080:80

Summary

kubectl describe a logs řeší 80% problémů. Pro network problémy použijte netshoot image.

Need Help with Implementation?

Our team has experience designing and implementing modern architectures. We’re happy to help.

Free Consultation

Share:

CORE SYSTEMS tým

Stavíme core systémy a AI agenty, které drží provoz. 15 let zkušeností s enterprise IT.