我正在尝试遵循此文档https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/在 Kubernetes 集群上运行 Cadvisor
yaml文件内容如下:
apiVersion: v1
kind: Namespace
metadata:
name: kube-system
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: cadvisor
namespace: kube-system
labels:
name: cadvisor
spec:
selector:
matchLabels:
name: cadvisor
template:
metadata:
labels:
name: cadvisor
spec:
containers:
- image: google/cadvisor:latest
name: cadvisor
ports:
- containerPort: 8080
restartPolicy: Always
status: {}
但是当我尝试部署它时:
kubectl apply -f cadvisor.daemonset.yaml
我得到输出+错误:
错误:验证“cadvisor.daemonset.yaml”时出错:验证数据时出错:[ValidationError(DaemonSet.status):io.k8s.api.apps.v1.DaemonSetStatus 中缺少必填字段“currentNumberScheduled”,ValidationError(DaemonSet.status):在 io.k8s.api.apps.v1.DaemonSetStatus 中缺少必填字段“numberMisscheduled”,ValidationError(DaemonSet.status):在 io.k8s.api.apps.v1.DaemonSetStatus 中缺少必填字段“desiredNumberScheduled”,ValidationError(DaemonSet.status ): io.k8s.api.apps.v1.DaemonSetStatus 中缺少必填字段“numberReady”];如果您选择忽略这些错误,请使用 --validate=false 关闭验证
但是在文档或谷歌的任何地方都没有关于这些必填字段的信息:(