Kubernetes - unable to run echoserver on minikube

3/2/2020

I am following this example

When I run the following command I get the error:

➜ kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.10
Error from server (NotFound): the server could not find the requested resource

I just installed fresh minikube, kubectl and the data is below:

Development/tools/k8s 
➜ kubectl get nodes                                                          
NAME       STATUS    AGE
minikube   Ready     2m

Development/tools/k8s 
➜ kubectl get pods 
No resources found.

Development/tools/k8s 
➜ kubectl get rc --all-namespaces
No resources found.

Development/tools/k8s 
➜ kubectl cluster-info                                                       
Kubernetes master is running at https://192.168.99.101:8443
KubeDNS is running at https://192.168.99.101:8443/api/v1/proxy/namespaces/kube-system/services/kube-dns

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

➜ kubectl version  
Client Version: version.Info{Major:"1", Minor:"5", GitVersion:"v1.5.3", GitCommit:"029c3a408176b55c30846f0faedf56aae5992e9b", GitTreeState:"clean", BuildDate:"2017-02-15T06:40:50Z", GoVersion:"go1.7.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"17", GitVersion:"v1.17.3", GitCommit:"06ad960bfd03b39c8310aaf92d1e7c12ce618213", GitTreeState:"clean", BuildDate:"2020-02-11T18:07:13Z", GoVersion:"go1.13.6", Compiler:"gc", Platform:"linux/amd64"}

➜ minikube version
minikube version: v1.7.3
commit: 436667c819c324e35d7e839f8116b968a2d0a3ff

What am I doing wrong?

-- DmitrySemenov
kubernetes
minikube

1 Answer

3/3/2020

Your kubectl is version 1.5 which is very old. It’s trying to use an outdated format for the Deployment resource which no longer exists in the server.

-- coderanger
Source: StackOverflow