Skip to main content

Multicloud Kubernetes Engine

Multicloud Kubernetes Engine gives your organization a managed Kubernetes cluster. Multicloud runs the control plane and the worker nodes. You get cluster-admin access with kubectl. The nodes come from your own cloud accounts. Multicloud picks the cheapest nodes that fit your pods, within your cost limit.

This guide is for the organization owner who creates and uses the cluster.

Contents

  1. What you get
  2. Prerequisites
  3. Create a Kubernetes pool
  4. Connect with kubectl
  5. Who owns what
  6. Pool lifecycle and cost
  7. Renew the credentials
  8. Troubleshooting
  9. Security
  10. Limits

1. What you get

A Kubernetes pool is a real Kubernetes cluster that belongs to your organization only. Multicloud hosts its control plane, so you pay for no control-plane machines. The pool adds worker nodes when pods wait for capacity. It removes nodes that have no work, down to the minimum number of nodes. Nodes are spot machines by default, across the clouds and regions that your pool allows. The cloud can stop a spot machine at short notice. Kubernetes then starts the pods of that node again on other nodes.

A pool has one type, and the type never changes:

Type What it is for kubectl access
kubernetes Your own managed cluster (this guide) Yes, cluster-admin
ci GitHub Actions runners No
extend Extra capacity for a cluster that you already run (Extend your cluster) No

2. Prerequisites

  • You are an owner of the organization. Members and API keys cannot create the pool or read its kubeconfig.
  • At least one connected cloud account (AWS, Google Cloud). To show the ID of each account, run mctl cloud-account list.
  • mctl 0.17.0 or later. The PyPI package is multicloud-cli. To install it, run pip install -U multicloud-cli. To run it without an install, use uvx --from multicloud-cli mctl --version.
  • cloudflared on your computer: brew install cloudflared on macOS. For other systems, see the cloudflared downloads page on the Cloudflare website.
  • kubectl on your computer.

Sign in with your own account before the steps below:

mctl auth login

3. Create a Kubernetes pool

MCP: create_pool(slug=<org-id>, type="kubernetes", name="my-cluster", cloud_accounts=[{"id": <account-id>}], max_cost_per_hour=2.0)

mctl pool create my-cluster --type kubernetes \
  --cloud-account <account-id> \
  --max-cost-per-hour 2.00
  • --cloud-account: the ID of a connected cloud account. Repeat the flag for more accounts: at most 5, one for each cloud.
  • --max-cost-per-hour: the cost limit in US dollars per hour, for all nodes of the pool together. The maximum value is 50. If you do not give the flag, the limit is 0.20.
  • --set NAME=VALUE: a pool setting, for example a processor architecture or a GPU type. See Pool settings.

The pool does not add a node when the total node cost would go above the cost limit. By default the pool keeps 1 node and has at most 3 nodes. To let an idle pool go to 0 nodes, add --set min_servers=0.

The command prints the pool ID. The cluster is usually ready in about 10 minutes. Check the status:

MCP: list_org_pools(slug=<org-id>) MCP: get_pool_cluster(slug=<org-id>, pool_id=<pool-id>)

mctl pool show <pool-id>

The status changes from provisioning to ready.

4. Connect with kubectl

mctl pool kubeconfig <pool-id>

The command does three things:

  1. It writes the kubeconfig to ~/.kube/mctl-<org-id>-<pool-id>.yaml and prints the file name. Only you can read the file (mode 0600).
  2. It adds one context to your own kubeconfig. The context name is the pool name. mctl uses the first file in $KUBECONFIG, or ~/.kube/config. It does not change your current context.
  3. It starts a local bridge to the cluster (cloudflared access tcp) and stays in the foreground.

Keep that terminal open. In a second terminal, run:

kubectl --context <pool-name> get nodes

As an alternative, use the separate file:

export KUBECONFIG=~/.kube/mctl-<org-id>-<pool-id>.yaml
kubectl get nodes

Run a first workload:

kubectl run hello --image=busybox --restart=Never -- echo hello
kubectl logs hello
kubectl delete pod hello

To stop the bridge, press Ctrl-C in the first terminal. To connect again later, run mctl pool kubeconfig <pool-id> again.

Options:

  • --context NAME: use NAME as the context name. By default the name is the pool name. If your kubeconfig has a context with that name for another cluster, the command stops. Choose another name.
  • --no-merge: do not add a context to your kubeconfig. Use the separate file only.
  • --out FILE: write the kubeconfig to another file. This option also skips the context.
  • --port N: use local port N for the bridge. By default mctl picks a free port.
  • --no-bridge: write the file only. To start the bridge later, run mctl pool kubeconfig <pool-id> --port N.

If kubectl is not installed, mctl adds no context and tells you to use the file. Run the command again to update the context, for example after you change the port. The kubeconfig points at 127.0.0.1. It works only while the bridge runs.

5. Who owns what

You have cluster-admin access. You own your workloads and every change that you make in the cluster. If a change breaks the cluster, you must repair it or delete the pool and create a new one.

Multicloud owns these parts and keeps them running:

  • The control plane: the Kubernetes API server, its datastore, and its certificates.
  • The node lifecycle: create, join, remove, and replace a node after a spot interruption.
  • The network: the cluster network (Cilium), the host firewall, and the encrypted links between nodes.
  • The cpu-units add-on and the NVIDIA device plugin.

Do not delete or change these parts. Multicloud checks these parts again and again. It resets a changed part to the Multicloud configuration.

Multicloud installs metrics-server and CoreDNS once. After that they are yours to change.

6. Pool lifecycle and cost

Task Command
Show the pool mctl pool show <pool-id>
Show the nodes and their cost mctl pool cluster <pool-id>
Change the cost limit or settings mctl pool update <pool-id> --max-cost-per-hour 3.00
Pause the pool (no nodes, no node cost) mctl pool hibernate <pool-id>
Resume the pool mctl pool wake <pool-id>
Delete the pool and all its data mctl pool delete <pool-id>

A hibernated pool keeps its cluster state: your Kubernetes objects stay. When the pool wakes, Kubernetes starts your pods on new nodes. Data on the local disk of a node does not stay. Keep important data outside the nodes. A deleted pool loses all cluster state. Back up what you need before you delete it.

You pay your cloud provider for the nodes that run. For the Multicloud charge, check the billing page of your organization.

7. Renew the credentials

mctl pool rotate-credentials <pool-id>
mctl pool rotation-status <pool-id>

The pool must be awake. You cannot hibernate the pool while a renewal runs. Your old kubeconfig stops working early in the renewal. After the renewal completes, run mctl pool kubeconfig <pool-id> again to get the new kubeconfig. If the command says that the kubeconfig is not ready, wait one minute and try again. A copy of the old kubeconfig cannot reach the cluster after the renewal. Renew the credentials when a person leaves your organization or when a kubeconfig file may have leaked.

8. Troubleshooting

Message or symptom Cause What to do
KUBERNETES_POOL_LIMIT: ... Your organization has the maximum number of Kubernetes pools. Delete a pool that you do not use, or ask Multicloud support for a higher limit.
An error that says an owner or a sign-in is necessary You used an API key, or you are not an owner. Run mctl auth login with an owner account.
The kubeconfig of pool N is not ready yet The cluster is not ready yet, or a credential renewal runs. Wait until mctl pool show <pool-id> shows ready, then try again.
TENANT_NOT_READY or audit_unavailable A short problem on the Multicloud side. Wait one minute and try again. If the error stays, contact Multicloud support.
cloudflared is not installed cloudflared is not on your computer. Install it (section 2).
kubectl fails with connection refused The bridge does not run. Run mctl pool kubeconfig <pool-id> and keep it open.
The bridge shows an error, for example websocket: bad handshake The credentials were renewed, so your kubeconfig is old. Run mctl pool kubeconfig <pool-id> again.
Pods stay Pending The pool cannot add a node within the cost limit, the node limit or the settings. Check mctl pool show <pool-id>. Increase --max-cost-per-hour, or allow more clouds, regions or sizes.

9. Security

  • The kubeconfig never goes to a browser. Only mctl gets it.
  • The Multicloud MCP tools never return the kubeconfig.
  • Only an organization owner, signed in with their own account, can read the kubeconfig. API keys cannot.
  • Each read of the kubeconfig writes an audit record.
  • The cluster API is not open to the internet.
  • Each request must pass Cloudflare Access with the access token of your pool.
  • mctl gives the access token to the bridge only. Your kubeconfig file does not hold it.
  • Your cluster is separate from all other clusters. It has its own certificates, access policy and credentials.

10. Limits

  • By default an organization can have 3 Kubernetes pools. A hibernated pool counts. A deleted pool does not count.
  • A pool keeps its type. To change the type, create a new pool.
  • To use the cluster, kubectl must run on a computer with mctl and cloudflared.