Determine what resource was not found from “Error from server (NotFound): the server could not find the requested resource”

前端 未结 4 2078
温柔的废话
温柔的废话 2021-02-20 10:34

I\'m running kubectl create -f notRelevantToThisQuestion.yml

The response I get is:

Error from server (NotFound): the server could no

相关标签:
4条回答
  • 2021-02-20 11:11

    The cause of problem in versions:

    From documentation

    a client should be skewed no more than one minor version from the master, but may lead the master by up to one minor version. For example, a v1.3 master should work with v1.1, v1.2, and v1.3 nodes, and should work with v1.2, v1.3, and v1.4 clients.

    0 讨论(0)
  • 2021-02-20 11:13

    From http://words.yuvi.in/post/kubectl-rbac/

    Running kubectl create -f notRelevantToThisQuestion.yml -v=8 will print all the HTTP traffic (requests and responses!) in an easy to read way. In this way, one can identify which resource is not available from the http responses.

    0 讨论(0)
  • 2021-02-20 11:15

    I have the same error when trying to do a CD with Jenkins and Kubernetes. In the pipeline I excute kubectl create -f app-deployment.yml -v=8 This image show more information about the error:

    0 讨论(0)
  • 2021-02-20 11:18

    To solve this downgrade the client or upgrade the server. In my case I've upgraded server (new minikube) but forget to upgrade client (kubectl) and end up with those versions.

    $ kubectl version --short
    Client Version: v1.9.0
    Server Version: v1.14.1
    

    When I'd upgraded client version (in this case to 1.14.2) then everything started to work again.

    Instructions how to install (in your case upgrade) client are here https://kubernetes.io/docs/tasks/tools/install-kubectl

    0 讨论(0)
提交回复
热议问题