Skip to content
On this page

Connecting clusters

Anyport works with your own infrastructure. You bring your clusters, and Anyport never meters the compute on them. Connect each one to Anyport so you can develop and deploy from one dashboard — projects, apps, logs, metrics. This page explains how to add your clusters and what to expect.

No cluster yet, and no wish to run one? Anyport Cloud runs a cluster for you on Pro, billed for what your apps use. It sits in the same list as the clusters you attach.

Anyport runs on Kubernetes. Each cluster you connect is a standard Kubernetes cluster — managed cloud (EKS/GKE/AKS), on-prem, k3s, or a local k3d cluster for trying things out. See Architecture for how Anyport's concepts map to Kubernetes.

What you need#

  • A Kubernetes cluster to connect (or a way to create one — k3d spins up a local cluster in seconds).
  • The Anyport CLI, and a kubeconfig context pointing at the cluster you want to connect. You do not need kubectl or Helm — the CLI talks to Kubernetes directly.
  • Permission to install into the cluster (the agent creates a namespace, default anyport, and runs there).

How to add a cluster#

anyport cluster attach

It asks what to call the cluster, registers it, and installs the agent into whatever kubectl currently points at — in one run. Pass --context to choose a different one, and --name to skip the question.

Because registering and installing happen together, a cluster cannot end up recorded in Anyport with no agent in it. That was the most common way setup used to go wrong.

The command waits for the agent to connect and tells you when it has. After that you develop and deploy from the dashboard — on the infra you brought.

The agent token#

Each cluster gets a token that is the agent's entire identity: there is no separate cluster id, and nothing to configure by hand. An agent holds cluster-admin on your cluster, so the token is treated like a password.

Anyport stores only its hash. The plaintext exists in exactly one response — the one that creates it — and the CLI consumes it in the same process that asked for it. It is never displayed, never pasted, and never left in your shell history.

It does not expire, and it is not consumed by first use: the agent presents it on every connection. That is why it is never written down anywhere. If you need to replace one — because it may have been exposed, or because you are reinstalling — reissue it and reinstall in one step:

anyport cluster reconnect <name>

The old token stops working immediately. There is no way to recover a token after the fact, because nothing anywhere is holding it.

Adding more clusters#

You can connect as many clusters as you have. Run anyport cluster attach once per cluster, with kubectl pointing at each; every one gets its own token.

Three are free on every plan. Past three you need Pro, where each further cluster is $2 a month, billed by the hour it exists; the pricing page has the rest. If an organization holds more than three on the free plan, or its credit stays below zero, the clusters past its three oldest are disconnected after 30 days, with an email at the start and a week before. Their apps keep running, and choosing Pro, buying credit or removing clusters reconnects them. The cluster list names any cluster due to be disconnected, and when.

All clusters in the same organization show up in one place. Switch between them in the UI; each can have its own projects and apps. Your infra, one place to develop and deploy.

What connecting sets up#

Every app is reached through the cluster's ingress controller. If the cluster already runs one (k3s bundles Traefik, for example), Anyport routes through it and never replaces it. If it runs more than one, Anyport routes through the one it installed, or else the one marked as the default IngressClass. If it runs none, Anyport installs Traefik when the agent first reports in. On a private cluster that Traefik has no load balancer, since traffic arrives through the gateway. On a public cluster its load balancer is the cluster's public address, and on a managed cloud that load balancer is billed by your provider like any other.

A public cluster gets a cluster hostname, which every app's generated URL sits under. It is created the first time the controller has a publicly routable address, with nobody having to ask. When the controller's address changes (the controller was reinstalled, or its Service re-created), the hostname follows it after the new address has held for two minutes, and the organization gets an address.changed notification. If you set the public address yourself, it is pinned: Anyport tells you when the controller answers somewhere else, and moving the hostname is left to you.

Clusters that Anyport set up on ingress-nginx, before Traefik became the default, keep it, because a new controller comes with a new public address. ingress-nginx is no longer maintained upstream, and the cluster page says so, with Switch to Traefik. The switch installs Traefik beside ingress-nginx and has both serve every app while the public address moves, so nobody is sent to an address that no longer works. After ten minutes, routes move to Traefik and ingress-nginx is removed. It can be cancelled until routes move. Before you start, the switch names any Ingress on ingress-nginx that Anyport did not create, such as one a Helm chart brought with it: Traefik does not serve those, so move them to class traefik first.

What a cluster has left#

A cluster's overview carries a Capacity panel: CPU, memory, pods and disk, as totals and per node. Disk is each node's root filesystem, the one that fills with images and logs and makes Kubernetes start evicting pods when it runs low. Each bar changes colour at 75% and again at 90%, as CPU and memory do, so a filling node is visible before anything is evicted. If a node does not report its disk, the total shows a dash rather than a sum that quietly leaves that node out.

What you can do next#

Once a cluster is connected you can:

  • Create projects (e.g. staging, prod).
  • Deploy apps, and add managed services (databases, caches, tools) from the catalog.
  • Pause projects or apps when you're not using them to save cost.

Next steps#

  • Quick start — End-to-end from sign-in to first connected cluster.
  • Installation — What the agent does and how the install command works.