在 Knative in Action 中处理一些示例,并在尝试设置最小 CPI 和 RAM 时遇到以下错误:
Omers-MacBook-Pro-2:Knative development$ kn service update hello-example --request 'cpu=500m,memory=256Mi'
Error: giving up after 3 retries: admission webhook "validation.webhook.serving.knative.dev" denied the request: validation failed: Saw the following changes without a name change (-old +new): spec.template.metadata.name
{*v1.RevisionTemplateSpec}.Spec.PodSpec.Containers[0].Resources.Requests:
-: "map[]"
+: "map[cpu:{i:{value:500 scale:-3} d:{Dec:<nil>} s:500m Format:DecimalSI} memory:{i:{value:268435456 scale:0} d:{Dec:<nil>} s: Format:BinarySI}]"
Run 'kn --help' for usage
我也尝试过(正如书中建议的那样):
Omers-MacBook-Pro-2:Knative development$ kn service update hello-example --requests-cpu 500m --requests-memory 256Mi
但这种格式似乎已被弃用。
关于为什么这可能会失败的任何想法?