Difference between kubectl exec and kubectl attach?

DevOps

YOUR COSMETIC CARE STARTS HERE

Find the Best Cosmetic Hospitals

Trusted • Curated • Easy

Looking for the right place for a cosmetic procedure? Explore top cosmetic hospitals in one place and choose with confidence.

“Small steps lead to big changes — today is a perfect day to begin.”

Explore Cosmetic Hospitals Compare hospitals, services & options quickly.

✓ Shortlist providers • ✓ Review options • ✓ Take the next step with confidence

kubectl attachkubectl exec
We can attach to the main process run by the container, which is not always bash. Which is the PID1. It allows us to execute any process within the container
Attach to the one running (no choice)Run any command you want to execute.