Kubernetes verison:1.02
PATCH / 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的错误吗?
答案 0 :(得分:6)
要使PATCH正常工作,您需要发送一个accepted content-type header values。
您的示例使用了merge patch,因此您应该发送:
Content-Type: application/merge-patch+json