error: the server doesn't have a resource type
Quote from moshe on 04/04/2023, 3:36 pmProblem
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
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