Users attempting to update cluster tags in VMware Tanzu Kubernetes Grid Integrated Edition (TKGI) via REST API receive an HTTP 500 Internal Server Error & status":405,"error":"Method Not Allowed. This occurs even when the user has successfully generated an authentication token and can retrieve tags using a GET request.
curl -H "Authorization: Bearer $AUTH_TOKEN" -H "Content-Type: application/json" -d @tags.json -X PATH https://${TKGI_ENDPOINT}:9021/v1/clusters/${TKGI_CLUSTER_NAME}
<!doctype html><html lang="en"><head><title>HTTP Status 500 – Internal Server Error</title><style>
curl -H "Authorization: Bearer $AUTH_TOKEN" -H "Content-Type: application/json" -d @tags.json -X PUT https://${TKGI_ENDPOINT}:9021/v1/clusters/${TKGI_CLUSTER_NAME}
{"timestamp":"2026-06-03T09:22:42.903+00:00","status":405,"error":"Method Not Allowed","path":"/v1/clusters/test"}
VMware Tanzu Kubernetes Grid Integrated Edition (TKGI)
The issue is caused by using unsupported HTTP methods such as PUT, POST, or PATH for updating cluster tags.
The TKGI API specifically requires the PATCH method for this operation. User need to run the below commands to update the tags.
curl -X PATCH "https://${TKGI_ENDPOINT}:9021/v1/clusters/${TKGI_CLUSTER_NAME}" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-k \
-H "Authorization: Bearer $my_token" \
-d '{
"cluster_tags": [
{
"name": "user",
"value": "test",
"category": null
},
{
"name": "env",
"value": "production",
"category": null
},
{
"name": "managerUrl",
"value": "https://${nsxmgrx}:443",
"category": null
}
],
"delete_all_tags": false
}'