<p>Through the REST API I am able to GET Node's details through:</p>

<pre><code>http://127.0.0.1:8001/api/v1/nodes/{Node Name}
</code></pre>

<p>However, I want to add a new label and delete an old one. Say add label <code>app=service</code>, and remove <code>backend=database</code>, What type of request am I supposed invoke and what's the JSON format am I required to send?</p>

<p>You can set a new label with the only one request.</p>

<p>JSON is:</p>

<pre><code>{
    "metadata": {
        "labels": {
            "app": "service"
        }
    }
}
</code></pre>

<p>You should send <code>PATCH</code> request to: </p>

<pre><code>http://127.0.0.1:8001/api/v1/nodes/&lt;node_name&gt;
</code></pre>

<p>So, finally we have:</p>

<pre><code>curl -k -v -H "Accept: application/json" -XPATCH -d '{"metadata":{"labels":{"app":"service"}}}' -H "Content-Type: application/merge-patch+json" http://127.0.0.1:8001/api/v1/nodes/&lt;node_name&gt;
</code></pre>
