Difference between kubectl exec and kubectl attach?

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.