如何解决我尝试部署Deployment.yaml但不起作用
我想在kubernetes中部署一个部署,到目前为止,它一直运行良好。但是今天早上,我试图以与过去完全相同的方式部署ew,当我执行kubectl create -f deployment.yaml
命令时,出现了以下错误:
错误:无法识别“ deployment.yaml”:版本“ apps / v1”中与“部署”类型不匹配
我没有从有效的部署中更改apiVersion,我知道此版本应该可以工作。我还尝试了其他版本,并得到了相同的错误。
我查看了api资源,并发现我缺少“部署”资源
$kubectl api-resources
NAME SHORTNAMES APIGROUP NAMESPACED KIND
bindings true Binding
componentstatuses cs false ComponentStatus
configmaps cm true ConfigMap
endpoints ep true Endpoints
events ev true Event
limitranges limits true LimitRange
namespaces ns false Namespace
nodes no false Node
persistentvolumeclaims pvc true PersistentVolumeClaim
persistentvolumes pv false PersistentVolume
pods po true Pod
podtemplates true PodTemplate
replicationcontrollers rc true ReplicationController
resourcequotas quota true ResourceQuota
secrets true Secret
serviceaccounts sa true ServiceAccount
services svc true Service
apiservices apiregistration.k8s.io false APIService
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。