Forum Navigation
You need to log in to create posts and topics.

error: the server doesn't have a resource type

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