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
}'
Run Code Online (Sandbox Code Playgroud)
这是API的错误吗?
小智 6
要使PATCH正常工作,您需要发送一个已接受的内容类型标头值.
您的示例使用合并补丁,因此您应该发送:
Content-Type: application/merge-patch+json
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
659 次 |
| 最近记录: |