405 response code on updating 3rd part kind object #39737

sbezverk opened this Issue Jan 11, 2017 · 2 comments


None yet

2 participants


Here is the description of the issue I am experiencing running kubernetes 1.5.1 on baremetal.
I need to update 1 value of 3rd party kind created object: here is the json of this object.


I need to update “state” field for another value. So I am using this json command:
"op": "replace", "path": "/spec/state", "value": "standby"

And then run curl:

curl -sSk --request PATCH --data "$(cat patch.json)" -H "Authorization: Bearer $KUBE_TOKEN" -H "Content-Type:application/json-patch+json"

I am constantly getting 405 error. I would greatly appreciate if you could let me know your thoughts about this issue.

"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "the server does not allow this method on the requested resource",
"reason": "MethodNotAllowed",
"details": {},
"code": 405
}curl ( response: 405, time: 0.082, size: 229

k82cn commented Jan 11, 2017

PATH is not supported by TPR. Try PUT with ResourceVersion is 0.

Here's my example: https://github.com/k82cn/kube-arbitrator/blob/master/pkg/util/consumer_control.go#L72 .


switching to PUT and correcting path solved this issue. Thank you very much for help..

@sbezverk sbezverk closed this Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment