Using custom data plane labels
You can set labels on each runtime instance (data plane) to provide custom context information.
Labels are commonly used for metadata information. Set anything that you need to identify your runtime instances – deployment type, region, size, the team that the instance belongs to, the purpose it serves, and much more.
Using labels makes it easier to manage runtime instances at scale since you’re able to identify all of this information at a glance. For example, debugging and troubleshooting become much easier when you’re able to attribute a runtime instance to a specific region or team.
Any labels you set on a runtime instance are visible from the control plane via the /nodes
Konnect API endpoint.
Set labels on a runtime instance
Validate
Check the /nodes
endpoint to ensure that your labels have been applied, and that the control plane is able to see them:
curl -i -X GET 'https://{REGION}.api.konghq.com/v2/runtime-groups/{RUNTIME_GROUP_ID}/nodes' \
--header 'Authorization: Bearer kpat_xgfT'
The response should look something like this, with an entry for labels
:
{
"items": [
{
"compatibility_status": {
"state": "COMPATIBILITY_STATE_FULLY_COMPATIBLE"
},
"config_hash": "ab5ff425e2518yh23ne23ea41a",
"created_at": 1683841722,
"data_plane_cert_id": "5773b391-8d17-4306-a205-5ed4837b1479",
"hostname": "fb64faa80215",
"id": "639fd146-6e08-4e1f-868d-b04ef41b4905",
"labels": {
"deployment": "mycloud",
"region": "us-east-1"
},
"last_ping": 1683844593,
"type": "kong-proxy",
"updated_at": 1683844593,
"version": "3.3.0.0"
}
],
"page": {
"next_cursor": "fgkWXVVfGRZFABRcQA19QVtCMWYNDw5KAJLFGHGIYDQBdQFQ==",
"total_count": 1
}
}