no matches for kind “Deployment“ in version “extensions/v1beta1“

简介: no matches for kind “Deployment“ in version “extensions/v1beta1“

问题

$ kubectl apply -f kube-state-metrics-deploy.yaml 
error: unable to recognize "kube-state-metrics-deploy.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"

解决方法

确认kubernetes 集群版本

$ kubectl get node
NAME     STATUS   ROLES                  AGE     VERSION
master   Ready    control-plane,master   5h28m   v1.20.1
node1    Ready    <none>                 5h26m   v1.20.1
node2    Ready    <none>                 5h25m   v1.20.1

查看支持apiversion版本,当前是apps/v1

$ kubectl api-resources  |grep deployment
deployments                       deploy       apps/v1                                true         Deployment

修改文件kube-state-metrics-deploy.yaml

apiVersion: apps/v1


相关文章
DelUninstall_0_0_0001Beta3
DelUninstall_0_0_0001Beta3
|
JSON Kubernetes 监控
K8S之yaml 文件详解(pod、deployment、service)
K8S之yaml 文件详解(pod、deployment、service)
9580 3
K8S之yaml 文件详解(pod、deployment、service)
|
Serverless Perl
R|apply,tapply
R|apply,tapply
|
Android开发
【Solve】InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored
【Solve】InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored
134 0
【Solve】InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored
|
Kubernetes Python 容器
Helm Values.yaml
Helm Values.yaml
|
Kubernetes Cloud Native 应用服务中间件
kubernetes Deployment【4】 client-go 管理 deployment
kubernetes Deployment【4】 client-go 管理 deployment
apply的手动实现
apply的手动实现
226 0
|
负载均衡 Perl
Istio - TrafficManagement - Fault Injection
Istio 故障注入与其他在网络层引入错误(例如延迟数据包或者直接杀死 Pod)的机制不同,Istio 允许在应用程序层注入故障。这使得可以注入更多相关的故障,比如 HTTP 错误代码等。
146 0
Istio - TrafficManagement - Fault Injection
|
Kubernetes API 微服务
Istio - TrafficeManagement - Match
在Route中最重要的字段是条件字段Match,为一个MatchRequest类型的数组,表示请求满足条件,支持将HTTP属性如uri、scheme、method、authority、port等作为条件来匹配请求。
201 0
|
存储 Kubernetes 网络协议
Kubernetes Release Note 解读(1.15, 1.16)
Kubernetes 1.16版本相较于1.14版本有着众多演进和增强,本文将对其进行一一解读。
3574 0