---
title: "为节点添加标签"
method: POST
path: "/api/v1/k8s/cluster/{id}/nodes/{nodeName}/labels"
tags: ["K8s节点管理"]
---

# 为节点添加标签

`POST /api/v1/k8s/cluster/{id}/nodes/{nodeName}/labels`

为指定节点添加标签

## Path parameters

- `id` integer, required
- `nodeName` string, required

## Request body

- ModelAddLabelRequest
  - `key` string, required
  - `value` string, required

## Response `200`

添加成功

- ResultResult
  - `code` integer — 状态码
  - `data` unknown
  - `message` string — 提示信息

## Other responses

- `400` — 参数错误
- `404` — 节点不存在
- `500` — 服务器错误

---

[API](https://skmtc.dev/opsre/apis/devops.md) · [All operations](https://skmtc.dev/opsre/apis/devops/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opsre/devops/revisions/25cac8835c4c/schema)
