首页 > 解决方案 > Kubernetes - 无法在 minikube 上运行 echoserver

问题描述

我正在关注这个例子

当我运行以下命令时,我收到错误:

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

我刚刚安装了新的 minikube、kubectl,数据如下:

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

我究竟做错了什么?

标签: kubernetesminikube

解决方案


您的 kubectl 是非常旧的 1.5 版。它正在尝试对服务器中不再存在的部署资源使用过时的格式。


推荐阅读