无法通过api修补rc? [英] Fail to patch rc by api?
本文介绍了无法通过api修补rc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Kubernetes版本:1.02
Kubernetes verison: 1.02
PATCH/api/v1/名称空间/default/replicationcontrollers/test
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的错误吗?
Is this a bug for API?
推荐答案
For PATCH to work you need to send one of the accepted content-type header values.
您的示例使用了合并补丁,因此您应该发送:
Your example uses a merge patch, so you should send:
Content-Type: application/merge-patch+json
这篇关于无法通过api修补rc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文