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

Posted July 2, 2019 4.8k views
DigitalOcean Kubernetes

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

$> kubectl get nodes
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

  • 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.


    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)

  • $> 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
    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”: [
    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

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

Submit an Answer