Update a Kubernetes cluster
Replaces the cluster's API server sources and sets or clears its externalClusterIPAccess, together or not at all, and answers 202 with the cluster. The API server sources are the networks the cluster's API endpoint answers besides its own nodes and the platform. The gateway applies the new list within a few minutes, and the cluster's conditions report the change until it does; a cluster still creating stays creating, and mints no credential, until then. A change cuts the connections a removed network holds on the endpoint. A null externalClusterIPAccess clears the cluster's setting, so it runs the value its managed add-ons carry. A change of the value the cluster runs, by a new setting or a cleared one, restarts the cluster's Cilium agents, all at once on a cluster whose traffic between nodes is encrypted and two nodes at a time on one whose encryption waits for its nodes (NodeEncryptionPending); a restart that stops progressing for 10 minutes sets the AddonsFailed condition with reason AgentRollStalled until it completes. A body that changes nothing answers 202 and writes nothing. A cluster that is failed or deleting answers 409 INVALID_CLUSTER_STATE, a list with an entry that is not an IPv4 network 400 INVALID_API_SERVER_SOURCES, an externalClusterIPAccess value the cluster's add-ons cannot apply yet 409 SETTING_UNSUPPORTED, and an expectedApiServerSources that differs from the cluster's list 409 CONCURRENT_UPDATE. A legacy API key needs clusters:write.
Required permission
Requires the kubernetes.write permission. See Permissions for the roles and API key permissions that include it.
Command line
The orl CLI wraps this endpoint:
orl kubernetes cluster update <id>apiKeyAuthorizationBearer <token>OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).
id*stringapplication/json- body
1 <= propertiesapiServerSources?array<>The cluster's new API server sources, replacing the list it holds. A list naming 0.0.0.0/0 admits any source. Absent leaves the list as it is. A change cuts the connections a removed network holds on the endpoint.
1 <= items <= 32expectedApiServerSources?array<>Optional list the caller reviewed, compared with the cluster's list as a set, ["0.0.0.0/0"] standing for any source. If they differ, answers 409 CONCURRENT_UPDATE without changing anything, so a change made since the review is not undone. The comparison and write are atomic.
1 <= items <= 32externalClusterIPAccess?booleanWhether a ClusterIP answers packets that enter a node from outside the cluster. Absent leaves the setting as it is, and null clears it, so the cluster runs the value its managed add-ons carry. A change of the value the cluster runs restarts its Cilium agents: all at once on a cluster whose traffic between nodes is encrypted, two nodes at a time on one whose encryption waits for its nodes (NodeEncryptionPending).
Update accepted
application/json- response
A managed Kubernetes cluster. We run its control plane; its nodes are in one data center, each alone on its host. Credentials are never part of it: use createKubernetesClusterToken or getKubernetesKubeconfig.
id*stringCluster id. It is also the first label of the API server hostname.
uuidorgId*stringname*stringstatus*KubernetesClusterStatuscreating: the control plane is being provisioned, and stays creating until it is serving and authorizes the platform's own writes. ready: fully operational. updating: a control-plane change is in progress. degraded: partially operational, for example the control plane stopped serving or its datastore is write-limited. deleting: deletion is in progress and final. failed: an unrecoverable error.
"creating""ready""updating""degraded""deleting""failed"kubernetesVersion*stringKubernetes version of the control plane and every node, for example v1.37.1.
locationId*stringThe data center the cluster's nodes run in. A cluster never spans data centers.
controlPlane*The managed control plane. One size, two replicas.
network*apiServerSources?array<>The networks the API server answers on its endpoint, besides the cluster's own nodes and the platform. Absent means any source.
1 <= items <= 32externalClusterIPAccess?booleanWhether a ClusterIP answers packets that enter a node from outside the cluster, for example from a host-network VPN router that advertises the service network. The cluster's setting when it has one, else the value its add-ons run; after a setting is cleared, the cleared value until they apply their own. Absent until the add-ons of a cluster with no setting first install.
nodeCounts*conditions?array<>createdAt*stringupdatedAt*stringcurl -X PATCH 'https://api.openrelay.inc/v1/kubernetes/clusters/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "orgId": "string", "name": "string", "status": "creating", "kubernetesVersion": "string", "locationId": "string", "controlPlane": { "replicas": 0, "readyReplicas": 0 }, "network": { "apiEndpoint": "string", "podCidr": "string", "serviceCidr": "string" }, "apiServerSources": [ "string" ], "externalClusterIPAccess": true, "nodeCounts": { "total": 0, "ready": 0, "notReady": 0, "pending": 0 }, "conditions": [ { "type": "string", "status": "True", "reason": "string", "message": "string", "lastTransitionTime": "string" } ], "createdAt": "string", "updatedAt": "string"}Get a Kubernetes cluster GET
Returns one cluster: its status, Kubernetes version, data center, control-plane replicas, API endpoint, pod and service networks, node counts and conditions. A legacy API key needs clusters:read.
Delete a Kubernetes cluster DELETE
Starts deleting the cluster, its node pools and every node, and answers 202; poll getKubernetesCluster, which answers 404 once deletion completes. Deletion is final: the cluster's state is not kept. Repeating the call finishes a deletion that could not remove everything. A legacy API key needs clusters:write.