GigakubeWikigigakube.ch →Menu ↓

Kubernetes

Managed Kubernetes clusters: we run the control plane and it is free, the nodes are servers in your project.

How it is built

Kubernetes is available where the zone offers it: if the Kubernetes section does not appear on the Cloud page, your zone does not have it today.

The cluster address

Every new cluster gets a name of three words in its zone, for example amber-falcon-river.gk01.ch: the API is https://amber-falcon-river.gk01.ch:6443. The name is published in DNS as soon as the cluster exists and disappears with it; it is in the API server certificate, so kubectl checks it as with any other server. All clusters of a zone share one address and are told apart by name, which is why the control plane is free. If you need an address of your own (dedicated endpoint, for example to filter it on your firewall), ask for it when you create the cluster with endpoint: dedicated.

What is inside, and what is not yet

Creating a cluster

In Cloud, Normal mode, Kubernetes section, press New Kubernetes cluster:

  1. Name: lowercase letters, digits and hyphens, starting with a letter, 2 to 20 characters.
  2. Version: the Kubernetes version, among those the zone offers.
  3. Node pools: for each pool - Pool: the name, a lowercase letter followed by letters and digits, up to 8 characters, different for each pool; - Size: the size of each node; - Nodes: how many nodes (0 is allowed); - Disk GB: each node's disk (at least 10, usually 40); - Public IP: a public IPv4 address for each node.

Add a pool adds a pool (up to 10). 4. Review the plan, then Create cluster.

The cluster goes from Creating to Ready. In the list you see the state, the version, the API address (endpoint) and how many nodes are ready out of how many were requested (… / … nodes ready). Next to it is the reminder Control plane free.

Managing a cluster

Open the cluster from the list:

The kubeconfig

The kubeconfig is the file kubectl uses to get into the cluster. It is a credential with full rights on the cluster: treat it like a password (Full rights on the cluster: keep it like a password).

To use it:

export KUBECONFIG=$PWD/<name>.kubeconfig
kubectl get nodes

For developers

What Method MCP tool Role
Available versions Cloud/getCatalog (kubernetes_versions) cloud_get_catalog viewer
List Cloud/getKubernetesClusterList cloud_get_kubernetes_cluster_list viewer
Details with nodes Cloud/getKubernetesCluster (cluster_id) cloud_get_kubernetes_cluster viewer
Create Cloud/createKubernetesCluster cloud_create_kubernetes_cluster operator
Add or resize a pool Cloud/setKubernetesNodePool (cluster_id, pool, size, count, disk_gb?, public_ip?) cloud_set_kubernetes_node_pool operator
Remove a pool Cloud/deleteKubernetesNodePool (cluster_id, pool) cloud_delete_kubernetes_node_pool operator
Delete Cloud/deleteKubernetesCluster (cluster_id) cloud_delete_kubernetes_cluster operator
Kubeconfig Cloud/getKubernetesKubeconfig (cluster_id) cloud_get_kubernetes_kubeconfig admin

Cloud/createKubernetesCluster accepts endpoint (shared, the default, or dedicated) and two forms for the nodes:

Not both at once. It also accepts idempotency_key and dry_run.

# a cluster with three s-2-4 nodes
curl -s https://gigakube.ch/api/rpc \
  -H "Authorization: Bearer $GIGAKUBE_API_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"Cloud/createKubernetesCluster","params":{"call_data":{"name":"prod","node_size":"s-2-4","node_count":3}}}'

# the kubeconfig, once it is ready (needs a key with the admin role)
curl -s https://gigakube.ch/api/rpc \
  -H "Authorization: Bearer $GIGAKUBE_API_KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"Cloud/getKubernetesKubeconfig","params":{"call_data":{"cluster_id":"<id>"}}}' \
  | jq -r '.result.call_data.kubeconfig' > prod.kubeconfig

A cluster has id, name, status (creating, ready, error, deleting), version, endpoint, endpoint_type (shared or dedicated), nodes_wanted, nodes_ready, node_pools, message. Before it is ready, the kubeconfig request answers with a conflict (The cluster is not ready yet).