【发布时间】:2020-01-29 11:18:48
【问题描述】:
我在运行 pod 时看到以下错误。我与 Kubernetes 网页中的文档相匹配,代码与我在下面编写的相同,但仍然出现以下错误。
错误验证数据:服务器找不到请求的资源;如果您选择忽略这些错误,请使用 --validate=false 关闭验证
apiVersion: v1
kind: pod
metadata:
name: helloworld-deployment
labels:
app: helloworld
spec:
containers:
- name: helloworld
image: anishanil/kubernetes:node
ports:
containerPort: 3000
resources:
limits:
memory: "100Mi"
cpu: "100m"
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.1", GitCommit:"b0b7a323cc5a4a2019b2e9520c21c7830b7f708e", GitTreeState:"clean", BuildDate:"2017-04-03T20:44:38Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"14", GitVersion:"v1.14.6+IKS", GitCommit:"44b769243cf9b3fe09c1105a4a8749e8ff5f4ba8", GitTreeState:"clean", BuildDate:"2019-08-21T12:48:49Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
非常感谢任何帮助
谢谢
【问题讨论】:
-
yaml缩进不正确,你可以在yamllint.com验证你的yaml
标签: kubernetes kubernetes-helm kubernetes-ingress kubernetes-pod