← LOG/KUBERNETES/ENTRY N° 134

Kubernetes create deployment failed with error

Kubernetes create deploy failed with error and solved it by upgrading both client and version of kubectl. In this article I show how you can follow the same steps that I did and resolve it by yourself.

FILED
READ
1 MIN
CATEGORY
KUBERNETES
TAGS
[SOLVED] · DEVOPS · HOW TO
STATUS
SOLVED

Kubernetes create deployment failed with error as shown below

~ ᐅ kubectl create deployment myserver --image=asia.gcr.io/who-dev/backendserver
Error from server (NotFound): the server could not find the requested resource

I have recently upgraded my minikube version and forgot to update my kubectl version as well. So, it looked like this before update.

~ ᐅ kubectl version --short
Client Version: v1.8.11
Server Version: v1.18.3

We can see that client version is behind server. After upgrade it looked like this.

~ ᐅ kubectl version --short
Client Version: v1.18.3
Server Version: v1.18.3

Both version match. After this try to recreate kubernetes deployment.

~ ᐅ kubectl create deployment myserver --image=asia.gcr.io/who-dev/backendserver
deployment.apps/myserver create

■ END OF ENTRY 134