gpt4 book ai didi

kubernetes - api打rc失败?

转载 作者:行者123 更新时间:2023-12-03 09:45:36 25 4
gpt4 key购买 nike

Kubernetes 版本:1.02

补丁/api/v1/namespaces/default/replicationcontrollers/test

body  
{"spec":
{"replicas": 3}
}

response
'{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "the server responded with the status code 415 but did not return more information",
"details": {},
"code": 415
}'

这是 API 的错误吗?

最佳答案

要使 PATCH 正常工作,您需要发送 accepted content-type header values 之一.

您的示例使用 merge patch ,所以你应该发送:

Content-Type: application/merge-patch+json

关于kubernetes - api打rc失败?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33205116/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com