---
title: "删除K8s命名空间"
method: DELETE
path: "/api/v1/k8s/cluster/{id}/namespaces/{namespaceName}"
tags: ["K8s命名空间管理"]
---

# 删除K8s命名空间

`DELETE /api/v1/k8s/cluster/{id}/namespaces/{namespaceName}`

删除指定的命名空间（会同时删除其中的所有资源）

## Path parameters

- `id` integer, required
- `namespaceName` string, required

## Response `200`

删除成功

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

## Other responses

- `400` — 参数错误
- `404` — 命名空间不存在
- `500` — 服务器错误

---

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