# Error from server (NotFound)

**URL:** <https://discuss.kubernetes.io/t/error-from-server-notfound/7296>\
**Category:** General Discussions\
**Tags:** development\
**Created:** [July 25, 2019, 4:40pm UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296 "2019-07-25T16:40:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coulthon](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@Coulthon](https://discuss.kubernetes.io/u/Coulthon)\
**Post date:** [July 25, 2019, 4:40pm UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/1 "2019-07-25T16:40:43Z")

</div>

So first time I have tried deplying a cluster. I have created a yaml file but am getting

Error from server (NotFound): the server could not find the requested resource

kubectl create -f radarr -v=8  
I0725 17:24:02.457635 16076 loader.go:357] Config loaded from file /home/courtp/.kube/config  
I0725 17:24:02.460342 16076 round\_trippers.go:414] GET [https://192.168.99.100:8443/swagger-2.0.0.pb-v1](https://192.168.99.100:8443/swagger-2.0.0.pb-v1)  
I0725 17:24:02.460369 16076 round\_trippers.go:421] Request Headers:  
I0725 17:24:02.460382 16076 round\_trippers.go:424] Accept: application/json, _/_  
I0725 17:24:02.460394 16076 round\_trippers.go:424] User-Agent: kubectl/v1.9.3 (linux/amd64) kubernetes/d283541  
I0725 17:24:02.481960 16076 round\_trippers.go:439] Response Status: 404 Not Found in 21 milliseconds  
I0725 17:24:02.482015 16076 round\_trippers.go:442] Response Headers:  
I0725 17:24:02.482029 16076 round\_trippers.go:445] Content-Length: 487  
I0725 17:24:02.482042 16076 round\_trippers.go:445] Date: Thu, 25 Jul 2019 16:24:02 GMT  
I0725 17:24:02.482055 16076 round\_trippers.go:445] Content-Type: application/json  
I0725 17:24:02.495970 16076 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”  
]  
}  
I0725 17:24:02.503351 16076 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  
}]  
F0725 17:24:02.503406 16076 helpers.go:119] Error from server (NotFound): the server could not find the requested resource

Anything else I can add?

---

<div class="post-metadata">

**Author:** ![rata](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/rata/32/18244_2.png) [@rata](https://discuss.kubernetes.io/u/rata)\
**Post date:** [July 25, 2019, 6:30pm UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/2 "2019-07-25T18:30:25Z")

</div>

Probably the yaml is wrong. Wanna share it? 🙂

---

<div class="post-metadata">

**Author:** ![Coulthon](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@Coulthon](https://discuss.kubernetes.io/u/Coulthon)\
**Post date:** [July 26, 2019, 11:25am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/3 "2019-07-26T11:25:51Z")

</div>

* * *

apiVersion: apps/v1  
kind: Deployment  
metadata:  
name: radarr  
labels:  
app: radarr  
spec:  
replicas: 1  
selector:  
matchLabels:  
app: radarr  
template:  
metadata:  
labels:  
app: radarr

```
 spec:
  containers:
     - name: radarr
       image: linuxserver/radarr
       imagePullPolicy: Always
       ports:
         - containerPort: 7878
      
env:
    - name: PGID
      value: "1000"
    - name: PUID
      value: "1000"

```

# volumeMounts:

# - mountPath: /config

# name: radarr-config

# - mountPath: /downloads

# name: radarr-downloads

# - mountPath: /movies

# name: radarr-movies

* * *

kind: Service  
apiVersion: v1  
#metadata:  
name: radarr-service  
spec:  
selector:  
app: radarr  
ports:

- protocol: TCP  
port: 7878  
targetPort: 7878  
type: NodePort

---

<div class="post-metadata">

**Author:** ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)\
**Post date:** [July 26, 2019, 11:31am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/4 "2019-07-26T11:31:27Z")

</div>

Just as a general FYI, please use markdown formatting for [code blocks](https://help.github.com/en/articles/creating-and-highlighting-code-blocks) when you post things like that. It makes it much easier for others to read. Here is the above post posted as a codeblock:

```auto
---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: radarr
   labels:
     app: radarr
 spec:
   replicas: 1
   selector:
      matchLabels:
        app: radarr
   template:
     metadata:
       labels:
         app: radarr   
     spec:
      containers:
         - name: radarr
           image: linuxserver/radarr
           imagePullPolicy: Always
           ports:
             - containerPort: 7878          
 	env:
        - name: PGID
          value: "1000"
        - name: PUID
          value: "1000"
 volumeMounts:
             - mountPath: /config
               name: radarr-config
             - mountPath: /downloads
               name: radarr-downloads
             - mountPath: /movies
               name: radarr-movies
---
kind: Service
apiVersion: v1
metadata:
  name: radarr-service
spec:
  selector:
    app: radarr
  ports:
  - protocol: TCP
    port: 7878
    targetPort: 7878
  type: NodePort

```

---

<div class="post-metadata">

**Author:** ![rata](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/rata/32/18244_2.png) [@rata](https://discuss.kubernetes.io/u/rata)\
**Post date:** [July 26, 2019, 11:55am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/5 "2019-07-26T11:55:10Z")

</div>

Yes, please, paste it again with markdown. Spaces are important in yaml and we can’t see that 🙂

---

<div class="post-metadata">

**Author:** ![Coulthon](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@Coulthon](https://discuss.kubernetes.io/u/Coulthon)\
**Post date:** [July 27, 2019, 6:42am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/7 "2019-07-27T06:42:20Z")

</div>

it does not let me post a md file. sorry guys Im so new to all this…

but

I found that I needed to update the client version. I have done this and now able to create the cluster!

my first cluster by TM 🙂

---

<div class="post-metadata">

**Author:** ![rata](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/rata/32/18244_2.png) [@rata](https://discuss.kubernetes.io/u/rata)\
**Post date:** [July 27, 2019, 8:42am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/8 "2019-07-27T08:42:55Z")

</div>

Try as bin said 🙂

---

<div class="post-metadata">

**Author:** ![ashwini](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@ashwini](https://discuss.kubernetes.io/u/ashwini)\
**Post date:** [July 30, 2019, 11:31am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/9 "2019-07-30T11:31:06Z")

</div>

If you are a naive or someone who don’t wanna land in trouble then, I’d recommend deploy using a specialized cloud paas like [RealCloud](https://realcloud.in), where you can deploy the Kubernetes Cluster with 1 click.

---

<div class="post-metadata">

**Author:** ![Jonatan](https://avatars.discourse-cdn.com/v4/letter/j/d07c76/32.png) [@Jonatan](https://discuss.kubernetes.io/u/Jonatan)\
**Post date:** [August 1, 2019, 9:12am UTC](https://discuss.kubernetes.io/t/error-from-server-notfound/7296/10 "2019-08-01T09:12:55Z")

</div>

I ran into **exactly** this issue and googled my way here.  
The problem for my was resolved by aligning my kubectl client and server versions.

These versions produced the error above:

```auto
kubectl version 2019-08-01 11:03:07
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.0", GitCommit:"e8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529", GitTreeState:"clean", BuildDate:"2019-06-19T16:32:14Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

```

Upgrading kubectl on my laptop to the same as the server version resolved the problem.  
May not work for you but perhaps worth a shot.  
I work with both (very) old and new clusters and use `asdf` with [this plugin](https://github.com/Banno/asdf-kubectl) to switch versions.
