What is the difference between kubectl exec and kubectl debug in Kubernetes?

Kubernetes Fundamentals Hard

Kubernetes Fundamentals — Hard

What is the difference between kubectl exec and kubectl debug in Kubernetes?

Key points

  • kubectl exec requires a running container to execute commands
  • kubectl debug enables debugging of containers without installed debug tools
  • Ephemeral containers are created for debugging with kubectl debug
  • kubectl debug can handle crash-looping pods

Ready to go further?

Related questions