Help Center/ Ubiquitous Cloud Native Service/ API Reference/ API/ Fleets/ Creating a Federation Connection and Downloading kubeconfig
Updated on 2025-07-29 GMT+08:00

Creating a Federation Connection and Downloading kubeconfig

Function

This API is used to create a VPC endpoint for connecting to the federation API server and downloading kubeconfig of the federation API server after federation is enabled for a fleet.

URI

POST /v1/clustergroups/{clustergroupid}/cert

Table 1 Path parameter

Parameter

Mandatory

Type

Description

clustergroupid

Yes

String

Fleet ID

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Identity authentication information

Table 3 Parameters in the request body

Parameter

Mandatory

Type

Description

projectID

Yes

String

Project ID

vpcID

Yes

String

VPC ID. The VPC must belong to the project specified by projectID.

subnetID

Yes

String

Subnet ID. The subnet must belong to the VPC specified by vpcID.

duration

Yes

Integer

Validity period of the certificate in kubeconfig, in days

Minimum value: 1

Maximum value: 1825

Response Parameters

Status code: 201

Table 4 Parameter in the response body

Parameter

Type

Description

[Array]

Array of strings

-

Example Request

Creating a federation connection and downloading kubeconfig

POST https://ucs.myhuaweicloud.com/v1/clustergroups/{clustergroupid}/cert

{
  "projectID" : "08d44be1ef00d22e2f6fc0061f54a2f1",
  "vpcID" : "11c9fe72-5a90-4295-bcfe-774726fb9066",
  "subnetID" : "0de91d89-1e06-4e24-b371-35d5d3d3779b",
  "duration" : 30
}

Example Response

None

Status Codes

Status Code

Description

201

The kubeconfig file content was obtained.

Error Codes

For details, see Error Codes.