CLI Tool¶
The cluster-bootstrap-cli automates cluster bootstrapping. Built in Go with Cobra, it handles secret decryption, Helm installation, and Kubernetes resource creation.
Installation¶
Homebrew (recommended)¶
Using go install¶
From local source:
# Clone the repository
git clone [email protected]:user-cube/cluster-bootstrap.git
cd cluster-bootstrap
# Install globally
go install ./cluster-bootstrap-cli
From GitHub:
This installs cluster-bootstrap-cli in your $GOPATH/bin (typically ~/go/bin). Make sure this directory is in your $PATH:
Verify installation:
Building from source¶
For development or customization:
# Option 1: Build locally
task build
# Creates: cluster-bootstrap-cli/cluster-bootstrap-cli
# Option 2: Install from local source
task install
# Installs to: $(go env GOPATH)/bin/cluster-bootstrap-cli
Other Taskfile commands¶
| Command | Description |
|---|---|
task build |
Build the binary locally |
task install |
Build and install to GOPATH/bin |
task clean |
Remove the binary |
task tidy |
Run go mod tidy |
task fmt |
Format Go source files |
task vet |
Run go vet |
task test |
Run tests |
Global Flags¶
These flags are available on all commands:
| Flag | Default | Description |
|---|---|---|
--base-dir |
. |
Base directory for repo content. Use when K8s manifests live in a subdirectory (e.g. k8s/). Affects local file resolution only (Chart.yaml, values, secrets files). |
-v, --verbose |
false |
Enable verbose output |
Commands¶
| Command | Description |
|---|---|
bootstrap |
Full cluster bootstrap sequence |
template |
Customize the template with your organization and repository |
doctor |
Check local tools and cluster access |
status |
Show cluster status and component information |
validate |
Validate local config and secrets |
init |
Interactive encryption setup |
vault-token |
Store Vault root token as K8s Secret |
gitcrypt-key |
Store git-crypt key as K8s Secret |
Dependencies¶
The CLI uses these key libraries:
| Library | Purpose |
|---|---|
github.com/spf13/cobra |
CLI framework |
github.com/charmbracelet/huh |
Interactive terminal UI |
github.com/getsops/sops/v3 |
SOPS encryption/decryption |
helm.sh/helm/v3 |
Helm SDK for chart installation |
k8s.io/client-go |
Kubernetes API client |