Report this

What is the reason for this report?

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

Posted on July 2, 2019

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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

This comment has been deleted

This question was answered by @sabrinac:

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

View the original comment

If you are like me and seeing this error, my error was having an old kubectl installed. To install the newest version you can look here. If you are like me and used brew use this:

brew upgrade kubernetes-cli

To validate you have the correct version of kubectl you can run:

kubectl version

And validate that you are within 1 minor version between server and client. I was off by 7.

Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T21:12:46Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.6", GitCommit:"72c30166b2105cd7d3350f2c28a219e6abcd79eb", GitTreeState:"clean", BuildDate:"2020-01-18T23:23:21Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}

After upgrade I was on 1.18 for my client, but it fixed my issue.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.