Documentation
¶
Overview ¶
Package cluster orchestrates the full lifecycle of a multi-node K8s cluster. It coordinates Lima VM provisioning, K3s installation, and cluster operations across multiple remote macOS hosts.
Index ¶
- func Apply(ctx context.Context, cfg *config.Config, dryRun bool) error
- func Backup(ctx context.Context, cfg *config.Config, outputDir string) error
- func Destroy(ctx context.Context, cfg *config.Config, force, dryRun bool) error
- func Init(ctx context.Context, cfg *config.Config, opts InitOptions) error
- func Join(ctx context.Context, cfg *config.Config, dryRun bool) error
- func Reconcile(ctx context.Context, cfg *config.Config, dryRun bool) error
- func Remove(ctx context.Context, cfg *config.Config, hostName string, dryRun bool) error
- func Restore(ctx context.Context, cfg *config.Config, snapshotPath string) error
- func Status(ctx context.Context, cfg *config.Config) error
- func Upgrade(ctx context.Context, cfg *config.Config, dryRun bool) error
- type InitOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Apply ¶
Apply iterates over all nodes in the cluster, gracefully rolling updates to VM configurations (CPUs, Memory) one at a time to ensure zero downtime.
func Reconcile ¶ added in v0.53.0
Reconcile converges already-provisioned nodes to the current desired baseline without rebuilding them. Today that means ensuring the standard node package set (lima.NodePackages — notably socat, which kubectl port-forward and devx bridge need to carry traffic on Docker-runtime k3s nodes) is installed inside every node's Lima VM.
Unlike Init/Join it does not touch K3s or VM lifecycle — it only installs packages on nodes that already exist, so a cluster that predates a new node-level requirement can adopt it without a destroy/recreate. It is safe to run repeatedly: apt-get install is idempotent and already-satisfied nodes are fast no-ops. Nodes are reconciled in parallel.
Types ¶
type InitOptions ¶
InitOptions configures the Init operation.