Question
Kubectl apply -f deployment.yml -> the server could not find the requested resource
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
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.
×
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 roundtrippers.go:421] Request Headers:
I0702 15:56:19.426219 65914 roundtrippers.go:424] Accept: application/json, /
I0702 15:56:19.426233 65914 roundtrippers.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 roundtrippers.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 roundtrippers.go:445] Content-Type: application/json
I0702 15:56:19.736253 65914 roundtrippers.go:445] Content-Length: 487
I0702 15:56:19.736260 65914 roundtrippers.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
@jkwiatkoski Any updates?
Are you going to update me or shall I just take my business to another provider?
Hey Anthony, can you please open a support ticket so we can investigate this?
@sabrinac I have
https://cloudsupport.digitalocean.com/s/case/500f200001RBeFXAA1/literally-nothing-works-error-from-server-notfound-the-server-could-not-find-the-requested-resource
Thanks! Checking it out now.
How was this resolved? There is no answer on here, and the link just links to sales force that users (me) cannot link to. I was following along to the tutorial below and I was getting the same error.
https://www.digitalocean.com/community/meetup_kits/getting-started-with-containers-and-kubernetes-a-digitalocean-meetup-kit
I understand this could be an issue with my kubernetes set up, but there wasn’t any part that told me I needed to set up kubernetes in a special way, please let me know what you find. thanks!