Skip to main content

Generate kubeconfig for a cluster

POST 

https://api.astropulse.io/api/v1/clusters/:clusterId/kubeconfig/generate

Generates a new kubeconfig file for a specific Kubernetes cluster

Request

Path Parameters

    clusterId stringrequired

    Cluster ID

Header Parameters

    X-Astro-API-Key stringrequired

    APIKey

Responses

Kubeconfig generated successfully

Schema
    data object
    clusterNamestringrequired

    clusterName is the name of the cluster

    Possible values: non-empty and <= 50 characters

    credentials objectrequired

    credentials maps to the cloud provider credentials

    data objectrequired

    data is the data for the credentials, the data is in the format of key-value pairs

    property name*string
    typestringrequired

    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: [dynamic, static]

    durationintegerrequired

    duration is the duration for which the kubeconfig is valid. The valid duration takes the pattern as 1h, 1m etc

    Possible values: [-9223372036854776000, 9223372036854776000, 1, 1000, 1000000, 1000000000, 60000000000, 3600000000000]

    idstring
    messagestring
    statusstring
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.astropulse.io/api/v1/clusters/:clusterId/kubeconfig/generate");
request.Headers.Add("Accept", "application/json");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
https://api.astropulse.io
Parameters
— pathrequired
— headerrequired