Skip to main content

Self-hosted networking

A self-hosted cluster runs in a network in your own account: one AstroPulse creates with the cluster, or a VPC or VPC network you already have. The control plane and the workers run in private subnets, and the Kubernetes API is reached through a public load balancer. Bring your own network when the cluster must share it with other systems or sit behind your own routing; otherwise let AstroPulse create one.

When you need it​

  • You need the cluster inside a VPC or VPC network you already run, next to other systems.
  • You need the cluster's addresses to fit a range plan that other networks connect to.

Before you start​

  • For your own network on AWS: the VPC ID, in the cluster's account and region.
  • For your own network on Google Cloud: the VPC network's name, in the cluster's project.
  • A network that does not use 100.64.0.0/10 (Pod and service addresses).

In the console​

  1. On the Network step of New cluster, the card reads VPC Configuration on AWS or Network Configuration on Google Cloud.
  2. Leave Use Existing VPC or Use Existing Network off for a new network: "A new VPC will be created for your cluster with default settings."
  3. To use your own, turn it on and enter the VPC ID (vpc- followed by its ID) or the Network ID, the network's name.

Review shows New VPC or Existing VPC with its ID.

You should see​

Once the cluster is Ready, its machines are in the network you chose, and kubectl reaches its API through the public endpoint: Access with kubectl.

AWS​

The cluster uses the region's first three zones, with a public and a private subnet in each:

  • Private subnets: the control-plane machines, one group per zone, and the worker groups.
  • Public subnets: the cluster's load balancers.
  • Kubernetes API: a public Network Load Balancer in front of the control plane.

With your own VPC, the dry run checks only the format of its ID.

Google Cloud​

The cluster uses one regional subnet that spans its zones, with a control-plane group in each of the region's first three zones and the worker groups beside them. The Kubernetes API is reached through a public load balancer in front of the control plane.

With your own network, the dry run checks only the format of its name.

Pod and service addresses​

The cluster gives pods and services addresses from 100.64.0.0/10, on both clouds, and runs Cilium for pod networking. Keep that range out of your own network and out of networks you connect to it.

Other ways in​

  • SDK and API: spec.provisioner.selfHosted.networkId in the cluster manifest. See the API reference.

With astroctl​

Add networkId to the manifest, then dry-run it:

YAML
spec:
provisioner:
type: selfHosted
selfHosted:
accountId: "123456789012"
networkId: vpc-0123456789abcdef0 # Google Cloud: the network's name, such as my-vpc-network
credentials:
type: Vault
Terminal
astroctl infra k8s apply -f prod.yaml --dry-run

Settings​

VPC ID / Network IDspec.provisioner.selfHosted.networkId

The network to create the cluster in. Left out, a new one is created with the cluster.

Accepts
On AWS, a VPC ID such as vpc-0123456789abcdef0. On Google Cloud, a network name of 1 to 63 lowercase letters, digits or hyphens.

If it's refused​

"invalid networkId for AWS: must be a VPC ID (e.g., vpc-0a1b2c3d4e5f67890)"
Cause
The manifest's networkId is not a VPC ID.
Fix
Use the VPC's ID.
"invalid networkId for GCP: must be 1-63 lowercase letters, digits, or hyphens (e.g., my-vpc-network)"
Cause
The manifest's networkId is not a network name.
Fix
Use the network's name, not its ID or URL.

Next​