kubernetes - 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
我究竟做错了什么?
解决方案
您的 kubectl 是非常旧的 1.5 版。它正在尝试对服务器中不再存在的部署资源使用过时的格式。
推荐阅读
- sql - 基于开始和结束日期的 Oracle SQL 数据迁移
- java - notifyDataSetChanged 在 kotlin 的适配器中不起作用
- java - 运行时的 GUI 与 NetBeans GUI 构建器上的设计 GUI 不同
- jdbc - JDBC 属性 - 全有或全无
- python - RuntimeError:事件循环已关闭“Launcher.killChrome”从未等待,如何解决?
- javascript - 使用一个正则表达式的字符串后面的项目的多次匹配
- javascript - 在 React 中执行时如何禁用点击事件?
- javascript - 汽车贷款计算器公式
- robotframework - 在机器人框架中,是否有一种方法可以在关键字中打印嵌入参数的变量值而不是变量名?
- azure - 在 Azure Kubernets 服务中使用 Helm 部署 Airflow 时在启动时安装 Linux 包