cakd init
Overview
Section titled “Overview”The cakd init command bootstraps your Kubernetes cluster by installing essential platform infrastructure components: ArgoCD, Prometheus/Grafana, Loki, and the cakd-agent. Run this after you provision a cluster and before deploying cakd projects.
cakd init [flags]| Flag | Short | Type | Default | Description |
|---|---|---|---|---|
--argocd | bool | false | Install ArgoCD | |
--monitoring | bool | false | Install Prometheus & Grafana | |
--logging | bool | false | Install Loki |
How It Works
Section titled “How It Works”- The command first checks if any component flags (
--argocd,--monitoring,--logging) are provided. If none are specified, it defaults to installing all three components. - For each selected component,
cakd initperforms the following steps:- ArgoCD: It adds the
argoHelm repository, updates it, and then installs or upgrades ArgoCD into theargocdnamespace. - Monitoring (Prometheus Stack):
- It creates a temporary Prometheus values file, embedding configuration for Alertmanager to route to the
cakd-agentwebhook. - It adds the
prometheus-communityHelm repository, updates it, and then installs or upgrades thekube-prometheus-stackinto themonitoringnamespace, using the temporary values file.
- It creates a temporary Prometheus values file, embedding configuration for Alertmanager to route to the
- Deploy CAKD Agent: If monitoring is enabled, the
cakd-agentis deployed to the cluster. - Logging (Loki): It adds the
grafanaHelm repository, updates it, and then installs or upgradesloki-stackinto themonitoringnamespace.
- ArgoCD: It adds the
- All Helm commands and agent deployment steps are executed sequentially, and their output is streamed to the console.
- The command exits with an error if any step fails.
Examples
Section titled “Examples”Install all default components
Section titled “Install all default components”cakd initInstall only ArgoCD and Loki
Section titled “Install only ArgoCD and Loki”cakd init --argocd --logging