<p>I am trying to figure out how to update a node's pod capacity. I have a simple cluster setup using the Vagrant/VM environment outlined in the documentation. I have attempted to patch the node's pod capacity using kubectl doing the following:</p>

<p>Sending just JSON needed for patch via:</p>

<pre><code>kubectl patch node 10.245.1.3 -p '{"status": {"capacity": {"pods": "4"}}}'
</code></pre>

<p>and</p>

<pre><code>kubectl patch node 10.245.1.3 -p "`cat node.json`"
</code></pre>

<p>Where node.json is the nodes JSON from a GET request except with pods change to 4 and the resourceVersion attribute removed.</p>

<p>The command seems to be accepted because the node's resourceVersion number changes. However, the capacity of pods does not. Any ideas?</p>

<p>I am using Kubernetes 1.0.6</p>

<p>NodeStatus is a subresource that is periodically updated by the node (kubelet) itself, and the capacity is calculated based on available resources (cpu, mem, etc) on the node. Updating the Node object does not update the status.</p>

<p>If you want to set a maximum capacity of a node, you can pass a <a href="https://github.com/kubernetes/kubernetes/blob/54706661ad72d62ea0b494112a74e0467093c9f4/cmd/kubelet/app/server.go#L317" rel="nofollow">flag to the kubelet</a> during startup. This would require you to restart kubelet though.</p>
