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

# 为节点添加污点

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

为指定节点添加污点，控制Pod调度

## Path parameters

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

## Request body

- ModelAddTaintRequest
  - `effect` 'NoSchedule' | 'PreferNoSchedule' | 'NoExecute', required
  - `key` string, required
  - `value` string

## 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)
