title: Manage replicas count for deployment using Kubernetes API
body: <p>I want to change the number of replications (pods) for a <strong>Deployment</strong> using the Kubernetes API (v1beta1).</p>
  
  <p>For now I'm able to increase the replicas from CLI using the command: </p>
  
  <pre><code>kubectl scale --replicas=3 deployment my-deployment
  </code></pre>
  
  <p>In the <a href="https://kubernetes.io/docs/api-reference/v1.5/#replace-scale" rel="noreferrer">Kubernetes API documentation</a> it's mention that there is a PUT request to do the same </p>
  
  <pre><code>PUT /apis/extensions/v1beta1/namespaces/{namespace}/deployments/{name}/scale
  </code></pre>
  
  <p>but there is no example of how to do it.</p>
  
  <p>I'm not sure what to send in the request body in order to perform the update.</p>