Velero 不会安装,"additionalProperties cannot be set to false"

Velero won't install, "additionalProperties cannot be set to false"

我在通过 Velero CLI 将 Valero 安装到 AWS Kubernetes 集群时遇到以下问题。

velero install \
     --provider aws \
     --bucket $BUCKET \
     --secret-file ./credentials-velero \    --use-restic --wait \
     --plugins velero/velero-plugin-for-aws:v1.0.0

安装失败,结果:

An error occurred:

Error installing Velero. Use `kubectl logs deploy/velero -n velero` to check the deploy logs: Error creating resource CustomResourceDefinition/backups.velero.io: CustomResourceDefinition.apiextensions.k8s.io "backups.velero.io" is invalid: [spec.validation.openAPIV3Schema.properties[spec].properties[labelSelector].properties[matchLabels].additionalProperties: Forbidden: additionalProperties cannot be set to false, spec.validation.openAPIV3Schema.properties[spec].properties[hooks].properties[resources].items.properties[labelSelector].properties[matchLabels].additionalProperties: Forbidden: additionalProperties cannot be set to false]--

对 additionalProperties 的唯一引用深嵌在生成的 .yaml 文件中,在本例中是用于备份的文件。我不知道这个字符串值是如何被非法设置为假的,但据我所知,这不是我使用的标志的结果。

解决方案:我试图在 Kubernetes v1.10 集群上安装 Velero v1.2.0(我目前无法升级)。事实证明,两者是不相容的。通过降级到Velero v1.1.0,我能够成功安装,并且这个错误信息消失了。