Generate kubeconfig for a Kubernetes cluster
POST/api/v1/clusters/:clusterId/kubeconfig
Generates the kubeconfig file for a specific Kubernetes cluster (requires admin or platform-admin role).
Request
Path Parameters
Cluster Id
Header Parameters
APIKey
- application/json
Body
required
kubeconfig generation data
Possible values: non-empty
and <= 50 characters
clusterName is the name of the cluster
credentials
object
required
data
object
required
data is the data for the credentials, the data is in the format of key-value pairs
Possible values: [static
, dynamic
]
type is the type of the credentials it expects, the supported types are static and dynamic if the type is static then platform aspects the standard ENV keys for cloud provider. Please follow the astro platform documentation for the keys. If the type is dynamic then the platform will use cloud provider supported capability to generate the credentials. Like for AWS it will use the STS assume role capability.
Possible values: [-9223372036854776000
, 9223372036854776000
, 1
, 1000
, 1000000
, 1000000000
, 60000000000
, 3600000000000
]
Responses
- 201
- 403
- 404
- 500
kubeconfig file
- application/json
- Schema
- Example (from schema)
Schema
{
"data": "string",
"id": "string",
"message": "string",
"status": "string"
}
forbidden to generate kubeconfig, only admin or platform-admin can generate kubeconfig.
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
cluster not found
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}
internal server error
- application/json
- Schema
- Example (from schema)
Schema
{
"error": "string",
"error_code": "string"
}