Kubernetes

Get kubeconfig

Issue a kubeconfig for the cluster. Every kubeconfig expires — the default lifetime is 7 days; use expires_in to choose another (10 minutes to 30 days). Grants full cluster-admin access while valid, so store it like a password, and rotate access to invalidate every issued kubeconfig at once.

For anything long-running (a workstation, CI), prefer the CLI: raff kubernetes kubeconfig <cluster-id> writes a kubeconfig that fetches a fresh token for every kubectl command, so it never expires and stores no credential on disk.

get/api/v1/k8s/clusters/{cluster_id}/kubeconfig

Path parameters

cluster_idstring required

Cluster ID (short id, e.g. q7z7zg)

Query parameters

expires_ininteger

Kubeconfig lifetime in seconds (10 minutes to 30 days). Defaults to 7 days when omitted. Expired kubeconfigs stop working on their own.

Headers

X-Project-IDstring uuid required

Project ID. Required for all mutating operations (create, delete, power actions, resize).

Response

Kubeconfig for kubectl

successboolean
kubeconfigstring

kubeconfig YAML

api_endpointstring

Example response

{
  "api_endpoint": "https://q7z7zg.k8s.raffusercloud.com:6443"
}

Changes

Changed in 2 of the 28 revisions of this API.2