Problem
User executing a kubectl command
kubectl exec mysql-5bd54dbfbd-qswf8:/tmp /bin/bash -n moshe-namespace
And gets the following error
kubectl exec [POD] [COMMAND] is DEPRECATED and will be removed in a future version. Use kubectl exec [POD] — [COMMAND] instead.
error: the server doesn’t have a resource type “mysql-5bd54dbfbd-qswf8:”
Solution
You have a typo in the command and the server doesn’t know where to find the object
Wrong:
kubectl exec mysql-5bd54dbfbd-qswf8:/tmp /bin/bash -n moshe-namespace
Correct
kubectl exec mysql-5bd54dbfbd-qswf8 /bin/bash -n moshe-namespace
We do this for a living.
Kubernetes, DevOps and platform engineering, delivered in days — not another weekend lost to a stack trace.
Start a project →