Kubectl apply -f deployment.yml -> the server could not find the requested resource

July 2, 2019 1.8k views
Kubernetes DigitalOcean

When I try to deploy anything to my cluster i get this response
“the server could not find the requested resource”

Commands:
$> kubectl get nodes
NAME STATUS ROLES AGE VERSION
ideea-prod-pool-1-o5a6 Ready <none> 1h v1.14.1
ideea-prod-pool-1-o5al Ready <none> 1h v1.14.1
ideea-prod-pool-1-o5at Ready <none> 1h v1.14.1

$> kubectl apply -f deployment.yml
Error from server (NotFound): the server could not find the requested resource

8 comments
  • Hi there,

    Can you please share the contents of deployment.yml? Please ensure to scrub it of an sensitive data such as usernames and passwords if they are specified there.

    Regards,

    John Kwiatkoski
    Senior Developer Support Engineer

  • None of them work. Even your own tutorials…

    Nonetheless here is the contents of deployment.yml (basic redis instance)

    https://gist.github.com/anthonybudd/4bfb090f8c3c2865bf39d8408a121a7a

  • $> kubectl apply -fdeployment.yml -v=8
    I0702 15:56:19.419439 65914 loader.go:357] Config loaded from file /Users/anthonybudd/.kube/config
    I0702 15:56:19.426161 65914 roundtrippers.go:414] GET https://abc74b05-b157-4b4a-adc9-7f8562f36da9.k8s.ondigitalocean.com/swagger-2.0.0.pb-v1
    I0702 15:56:19.426201 65914 round
    trippers.go:421] Request Headers:
    I0702 15:56:19.426219 65914 roundtrippers.go:424] Accept: application/json, /
    I0702 15:56:19.426233 65914 round
    trippers.go:424] User-Agent: kubectl/v1.9.7 (darwin/amd64) kubernetes/dd5e1a2
    I0702 15:56:19.736201 65914 roundtrippers.go:439] Response Status: 404 Not Found in 309 milliseconds
    I0702 15:56:19.736227 65914 round
    trippers.go:442] Response Headers:
    I0702 15:56:19.736236 65914 roundtrippers.go:445] Audit-Id: cb66376c-6c1d-46f9-99a5-e290585e7a12
    I0702 15:56:19.736245 65914 round
    trippers.go:445] Content-Type: application/json
    I0702 15:56:19.736253 65914 roundtrippers.go:445] Content-Length: 487
    I0702 15:56:19.736260 65914 round
    trippers.go:445] Date: Tue, 02 Jul 2019 20:56:19 GMT
    I0702 15:56:19.740779 65914 request.go:873] Response Body: {
    “paths”: [
    “/apis”,
    “/apis/”,
    “/apis/apiextensions.k8s.io”,
    “/apis/apiextensions.k8s.io/v1beta1”,
    “/healthz”,
    “/healthz/etcd”,
    “/healthz/log”,
    “/healthz/ping”,
    “/healthz/poststarthook/crd-informer-synced”,
    “/healthz/poststarthook/generic-apiserver-start-informers”,
    “/healthz/poststarthook/start-apiextensions-controllers”,
    “/healthz/poststarthook/start-apiextensions-informers”,
    “/metrics”,
    “/openapi/v2”,
    “/version”
    ]
    }
    I0702 15:56:19.742295 65914 helpers.go:201] server response object: [{
    “metadata”: {},
    “status”: “Failure”,
    “message”: “the server could not find the requested resource”,
    “reason”: “NotFound”,
    “details”: {
    “causes”: [
    {
    “reason”: “UnexpectedServerResponse”,
    “message”: “unknown”
    }
    ]
    },
    “code”: 404
    }]
    F0702 15:56:19.742334 65914 helpers.go:119] Error from server (NotFound): the server could not find the requested resource

  • Are you going to update me or shall I just take my business to another provider?

  • Show 3 more comments
2 Answers

This question was answered by @sabrinac:

Hey Anthony, can you please open a support ticket so we can investigate this?

View the original comment

Have another answer? Share your knowledge.