I downloaded Lens and imported my config file there and everything works great on Lens
other than the fact that kubectl
commands don't work through the terminal.
I was trying an exec command:
kubectl exec -i -t -n mynamespace mypod -c mycontainer -- sh -c "clear; (bash || ash || sh)"
And I got:
PS C:\Users\<user> kubectl exec -i -t -n mynamespace mypod -c mycontainer -- sh -c "clear; (bash || ash || sh)"
Access denied
line:1 char:1
+ kubectl exec -i -t -n mynamespace mypod -c...
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], UnauthorizedAccessException
+ FullyQualifiedErrorId : System.UnauthorizedAccessException
When I try to run that command through a CMD prompt or PowerShell prompt it works fine.
Anyone's got an idea why am I getting Access denied
?