i have a simple automation to exec into a kubernetes pod but it always results in the below error :-
kubectl exec -it my
I got it working using the below approach :-
kubectl exec -ti my-pod -c my-container -n my-namespace -- ls