Kubernetes Cluster
The cosmo connect k8s
CLI command connects your Cosmonic Super Constellation to a Kubernetes
cluster of your choice.
How it works
Given a Super Constellation operating in the Cosmonic App, cosmo connect k8s
extends your constellation with two or more Kubernetes-based hosts.
cosmo connect k8s
accomplishes this by:
- Connecting to your Kubernetes cluster
- Starting wasmCloud host workloads
- Connecting your Super Constellation with the newly created hosts
Once cosmo connect k8s
has finished creating your nodes, you can execute actors and providers on
them just like any other managed node on the Cosmonic app.
Infrastructure Diagram
Here's an infrastructure diagram to represent the flow of traffic to your Kubernetes cluster:
Pre-requisites
To run cosmo connect k8s
, you'll need:
- A Cosmonic platform account
cosmo
installed locally- A Kubernetes cluster
Quickstart
To get started quickly, run the following command:
cosmo connect k8s
The command will:
- Connect to your Cosmonic super constellation (prompting login if you have not already)
- Start resources on your Kubernetes cluster to enable one or more wasmCloud hosts
- Start the Kubernetes Applier Capability Provider, Kubernetes Applier Actor and related providers
Once completed, the output of cosmo connect k8s
should look similar to the following:
Successfully connected to constellation [<constellation ID>]
✅ Successfully connected to k8s cluster
>>> ⠀⡐ Successfully created Role
✅ Successfully applied k8s resources
✅ Successfully started k8s resources
ℹ️ Found [<n>] k8s hosts
✅ Successfully started service applier actor
🔗 Kubernetes cluster successfully connected!
🚀 Open Cosmonic (https://app.cosmonic.com) to interact with your Kubernetes hosts.
Managing Kubernetes hosts from the Cosmonic Application
Once started, Cosmonic hosts running in Kubernetes can be managed from the Cosmonic platform like any other hosts:
Deploying an actor to a Kubernetes host
Now that you've gotten your Kubernetes cluster connected to your Cosmonic Super Constellation, you can get started launching workloads on your Kubernetes nodes: