---
title: "Upload kubeConfig file for cluster"
method: POST
path: "/rest-api/v1/cluster/config/file"
tags: ["cluster"]
---

# Upload kubeConfig file for cluster

`POST /rest-api/v1/cluster/config/file`

Uploads a KubeConfig file for cluster, with a maximum size of 2MB.

## Response `200`

Returns the content of the uploaded KubeConfig file.

## Other responses

- `400` — The uploaded file is too large or the request is invalid.
- `500` — Internal server error.

## Changes

- **2023-12-29** `fa4b9c305a29` — 1 info
  - endpoint added
- **2023-12-11** `2a20fa0acab4` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/kusionstack/apis/karpor/changes/rest-api/v1/cluster/config/file/post.md)

---

[API](https://skmtc.dev/kusionstack/apis/karpor.md) · [All operations](https://skmtc.dev/kusionstack/apis/karpor/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kusionstack/karpor/revisions/d741ac56c269/schema)
