Installation¶
Prerequisites¶
- Go (1.21+) — Required to build the CLI
- kubectl — Kubernetes CLI, configured with cluster access
- Helm (3.x) — Used internally for template rendering
- ArgoCD — Deployed on the target cluster (for GitOps workflows)
Install With Homebrew¶
Add the Hydra tap:
Install the package for your platform:
macOS recommended (source formula):
Linux recommended (download the released binary from GitHub):
Hydra ships both artifacts via Homebrew:
hydra-bindownloads prebuilt CLI archives from signed GitHub releases and is recommended on Linux.hydrabuilds from source tarballs in the tap formula and is recommended on macOS.
If you prefer a source build on Linux, this also works:
Uninstall Homebrew packages with:
brew uninstall hydra-gitops/homebrew-tap/hydra
# or
brew uninstall hydra-gitops/homebrew-tap/hydra-bin
brew untap hydra-gitops/tap
Building the Hydra CLI¶
Move the binary to a directory in your $PATH:
Setting Up HYDRA_CONTEXT¶
Hydra needs to know where your cluster configurations live. Set the HYDRA_CONTEXT environment variable to point at the context directory inside your GitOps repository:
Each subdirectory in this path represents one cluster (e.g., dev, cicd, team1, team2).
See Configuration → HYDRA_CONTEXT for details.
Configuring Kubeconfig Mapping¶
If you manage multiple clusters, create ~/.config/hydra/config.yaml to map cluster directories to specific kubeconfig files:
contexts:
- path: /path/to/gitops-repository/clusters/prod
config: ~/.kube/prod.conf
name: prod-admin
- path: /path/to/gitops-repository/clusters/test
config: ~/.kube/test.conf
name: test-admin
See Configuration → config.yaml for the full reference.
Verifying Connectivity¶
This verifies that your current kubectl context matches the allowed contexts configured for the cluster. If successful, Hydra can communicate with the cluster API.
Next Steps¶
- Tutorial Introduction — Start with Hydra modes,
HYDRA_CONTEXT, and the first local workflow - Concepts: Context and Clusters — Understand the context model