The easiest way is to get the actual data first:
GET /apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale
This will give you a yaml or json object that you can modify and send back with a PUT request.
With a spin, the circuit is as follows:
API_URL="http://kubernetes:8080/apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale" curl -H 'Accept: application/json' $API_URL > scale.json # edit scale.json curl -X PUT -d@scale.json -H 'Content-Type: application/json' $API_URL
Alternatively, you can simply use the PATCH call:
PAYLOAD='[{"op":"replace","path":"/spec/replicas","value":"3"}]' curl -X PATCH -d$PAYLOAD -H 'Content-Type: application/json-patch+json' $API_URL
pagid source share