简体   繁体   English

错误:扩展名/没有匹配项,Kind=Deployment

[英]error: no matches for extensions/, Kind=Deployment

I am trying to create deployment on my local kubernetes claster by running the following我正在尝试通过运行以下命令在我的本地 kubernetes claster 上创建部署

kubectl create deployment kubernetes-kubectl --image=firstkube:v1

I am getting the following response我收到以下回复

error: no matches for extensions/, Kind=Deployment

Here are some details on my local environment以下是有关我本地环境的一些详细信息

kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.1", GitCommit:"3a1c9449a956b6026f075fa3134ff92f7d55f812", GitTreeState:"clean", BuildDate:"2018-01-04T11:52:23Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"windows/amd64"}
Server Version: version.Info{Major:"1", Minor:"16+", GitVersion:"v1.16.6-beta.0", GitCommit:"e7f962ba86f4ce7033828210ca3556393c377bcc", GitTreeState:"clean", BuildDate:"2020-01-15T08:18:29Z", GoVersion:"go1.13.5", Compiler:"gc", Platform:"linux/amd64"}

kubectl get nodes 
NAME             STATUS    ROLES     AGE       VERSION
docker-desktop   Ready     master    16m       v1.16.6-beta.0

My docker version我的docker版

docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        afacb8b
 Built:             Wed Mar 11 01:23:10 2020
 OS/Arch:           windows/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.8
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       afacb8b
  Built:            Wed Mar 11 01:29:16 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

What am I doing wrong?我究竟做错了什么?

Your kubectl client and server version are too far apart.您的 kubectl 客户端和服务器版本相差太大。 As You can read here :你可以在这里阅读:

You must use a kubectl version that is within one minor version difference of your cluster.您必须使用与集群的一个次要版本差异内的 kubectl 版本。 For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master.例如,v1.2 客户端应与 v1.1、v1.2 和 v1.3 主服务器一起使用。 Using the latest version of kubectl helps avoid unforeseen issues.使用最新版本的 kubectl 有助于避免不可预见的问题。

You should follow the docs on how to upgrade the kubectl here .您应该在此处遵循有关如何升级 kubectl 的文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 kubernetes错误:无法识别“deployment.yaml”:没有匹配扩展名/,Kind =部署 - kubernetes error: unable to recognize “deployment.yaml”: no matches for extensions/, Kind=Deployment 版本“apps/v1”中的“部署”类型没有匹配项 - no matches for kind "Deployment" in version "apps/v1" 无法识别“calico.yaml”:版本“apps/v1beta1”中类型“部署”没有匹配项 - unable to recognize "calico.yaml": no matches for kind "Deployment" in version "apps/v1beta1" 在 kubernetes 1.18 上运行应用程序时,版本/扩展 b1beta1 中的部署类型不匹配 - No matches for kind of Deployment in version/extensionsb1beta1 while running the app on kubernetes 1.18 kubectl apply -f k8s:无法识别服务和部署,并且与版本“ v1”中的“服务”类型不匹配 - kubectl apply -f k8s: is unable to recognize service and deployment and has no matches for kind “Service” in version “v1” 未找到 Kubernetes deployment.extensions - Kubernetes deployment.extensions not found 如何在kubernetes部署类中覆盖dnsconfig - How to override dnsconfig in kubernetes deployment kind Kubernetes [错误:没有种类“CertificateSigningRequest”] - Kubernetes [error: no kind "CertificateSigningRequest"] kubectl 与版本 apps/v1 中的 kind Service 不匹配 - kubectl no matches for kind Service in version apps/v1 流星向上部署错误 - Meteor Up deployment error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM