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


相关文章
|
4月前
|
Kubernetes 开发工具 容器
【kubernetes】解决k8s1.28.4:NotReady message:Network plugin returns error: cni plugin not initia...
【kubernetes】解决k8s1.28.4:NotReady message:Network plugin returns error: cni plugin not initia...
233 0
|
7月前
|
数据采集 供应链 搜索推荐
什么是 SAP OData Annotations 的 metadata extension files
什么是 SAP OData Annotations 的 metadata extension files
43 0
|
Kubernetes Linux 容器
Kubernetes CKS【13】---Microservice Vulnerabilities - Container Runtime Sandboxes
Kubernetes CKS【13】---Microservice Vulnerabilities - Container Runtime Sandboxes
Kubernetes CKS【13】---Microservice Vulnerabilities - Container Runtime Sandboxes
|
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
【Solve】InnerClass annotations are missing corresponding EnclosingMember annotations. Such InnerClass annotations are ignored
|
负载均衡 Perl
Istio - TrafficManagement - Fault Injection
Istio 故障注入与其他在网络层引入错误(例如延迟数据包或者直接杀死 Pod)的机制不同,Istio 允许在应用程序层注入故障。这使得可以注入更多相关的故障,比如 HTTP 错误代码等。
123 0
Istio - TrafficManagement - Fault Injection
|
域名解析 存储 Kubernetes
Kubernetes Release Note 解读
本文主要为大家解读 Kubernetes v1.15、Kubernetes v1.16 的不同功能。分别从 Node、scheduler、CRD、API Server 等5个方面进行详细讲解。
740 0
Kubernetes Release Note 解读
|
存储 Kubernetes 网络协议
Kubernetes Release Note 解读(1.15, 1.16)
Kubernetes 1.16版本相较于1.14版本有着众多演进和增强,本文将对其进行一一解读。
3411 0
|
Kubernetes Linux Docker
Kubernetes in action (deployed)
一、写在前面: 云提供了kubernetes的Paas服务,但是很多同学对kubernetes的使用不是很清楚,最根本的原因就是出发点不同。cloud是要把技术门槛降低,通过可视化的配置降低学习成本;而企业要的是稳定性,以及故障恢复的时效性,以及故障复盘;这就造成了一系列的问题:support视角:1.
2468 0
|
Web App开发 JavaScript 前端开发
|
开发工具 对象存储
How to Apply Alibaba Cloud Object Storage Service Resources to Websites
This article discusses the various applications of OSS and addresses some of the most common issues when applying OSS to websites.
1747 0