import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/external-cloud-provider/converge"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/external-cloud-provider/converge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/external-cloud-provider/converge \
--header 'Authorization: Bearer <token>'{
"external_cloud_provider": true,
"converged_resource_ids": [
"<string>"
],
"already_external_resource_ids": [
"<string>"
],
"verified_node_count": 123,
"applies": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Converge Hetzner external cloud provider
Store external_cloud_provider=true on every Kubernetes node definition of a Hetzner k3s cluster whose definitions say false while its nodes already run for the hcloud cloud controller manager (a cluster created by the Python lane). The flag is an instruction to the day-2 lanes, so it is only written when EVERY node, read from the platform’s node census (the k8s-sync mirror, nodes seen in the last 30 minutes), already carries the external shape: the kubelet argument cloud-provider=external in its k3s.io/node-args annotation, on a k3s server also —disable-cloud-controller and servicelb disabled, and an hcloud:// providerID. Only the stored definitions change: no node is restarted, re-tainted or re-registered and no job is dispatched. Anything else answers 409 with a detail message naming each node to remediate first and why; a node the census cannot vouch for (no fresh node at all, a node missing from the census, a node without a readable k3s.io/node-args annotation, a Kubernetes node resource that is not up or has no stored definition) is refused the same way rather than assumed wired. The other invalid states (a cluster of another provider or distribution, no Kubernetes node resources, a node update, version upgrade or node restart in progress) also answer 409. A cluster whose definitions already all say true answers 200 without reading the census.
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/external-cloud-provider/converge"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/external-cloud-provider/converge', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/external-cloud-provider/converge \
--header 'Authorization: Bearer <token>'{
"external_cloud_provider": true,
"converged_resource_ids": [
"<string>"
],
"already_external_resource_ids": [
"<string>"
],
"verified_node_count": 123,
"applies": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
What every Kubernetes node definition of the cluster now stores: always true.
The Kubernetes node resources this call flipped from false.
The Kubernetes node resources that already stored true.
How many nodes the census found running for the hcloud cloud controller manager; null when no definition needed flipping and the census was not read.
What the convergence changed, and that it restarted, re-tainted and re-registered nothing.