sops-init
Generate age encryption key for SOPS secret management.Syntax
Behavior
- Checks if age key already exists at
~/.config/sops/age/keys.txt - If exists: Displays public key
- If not exists:
- Creates directory
~/.config/sops/age/ - Generates new age key pair
- Saves private key to
keys.txt - Displays public key
- Creates directory
Example
Output
Next Steps
After generating the key:- Add public key to
.sops.yaml:
- Encrypt secrets:
- Decrypt secrets:
Use Cases
- Initial secrets infrastructure setup
- Rotate encryption keys
- Team member onboarding
- CI/CD secret encryption
Related Tools
sops- Secret encryption/decryptionage- Modern encryption tool.sops.yaml- SOPS configuration file
cloudflared-setup
Set up Cloudflare Tunnel for secure external access.Syntax
Behavior
Automated setup of Cloudflare Tunnel:- Login: Authenticates with Cloudflare (opens browser)
- Create Tunnel: Creates tunnel named
microservice-infra - Get Credentials: Extracts tunnel ID and credentials file
- Create Secret: Injects credentials into Kubernetes as Secret
- Create DNS: Creates CNAME records for configured domains
- Instructions: Displays Cloudflare Access setup steps
Example
Output
Configured Domains
The script creates DNS records for:grafana.thirdlf03.com- Grafana observability UIhubble.thirdlf03.com- Hubble network observabilityargocd.thirdlf03.com- ArgoCD GitOps UI
Cloudflare Access Setup
After running the command, configure Zero Trust Access:- Go to: https://one.dash.cloudflare.com/
-
Add Identity Provider:
- Navigate to: Zero Trust → Integrations → Identity providers
- Add new → GitHub
- Configure GitHub OAuth App credentials
-
Create Access Applications:
- Navigate to: Zero Trust → Access → Applications
- Create application for each subdomain
- Configure authentication policies
-
Add Policy:
- Action: Allow
- Include: GitHub Organization =
<your-org>
Apply Manifests
After setup, deploy Cloudflared:Use Cases
- Expose local cluster to internet
- Share development environment
- Demo applications to clients
- Test external integrations
- Secure remote access
Related Commands
- bootstrap - Automatically applies cloudflared if configured
- gen-manifests - Regenerate with tunnel credentials
istio-install
Install Istio service mesh in ambient mode.Syntax
Behavior
- Gateway API CRDs: Installs Kubernetes Gateway API v1.5.0
- Istio Installation: Installs Istio with ambient profile
- Tracing Configuration: Enables OpenTelemetry tracing
- Namespace Setup: Creates and labels
microservicesnamespace - Waypoint Proxy: Deploys waypoint proxy for L7 processing
- Custom Resources: Applies Istio CRs from
istio/directory
Example
Output
Configuration
Istio is installed with:Ambient Mode Features
- L4 Processing: ztunnel for transparent TCP/UDP proxying
- L7 Processing: Waypoint proxy for HTTP/gRPC features
- No Sidecars: Reduced resource overhead
- Namespace-Scoped: Label namespaces for ambient mode
Namespace Configuration
Themicroservices namespace is labeled:
Use Cases
- Service mesh for microservices
- Mutual TLS between services
- Traffic management (retries, timeouts)
- Distributed tracing
- Circuit breaking
- Canary deployments
Related Commands
- bootstrap-full - Includes Istio installation
- cilium-install - Install before Istio for CNI
cilium-install
Install Cilium CNI with Hubble observability.Syntax
Behavior
- Helm Installation: Installs Cilium via OCI chart
- Image Pull: Uses
IfNotPresentpolicy (assumes image pre-loaded) - CNI Configuration: Configures for Istio coexistence
- Hubble Setup: Enables Hubble Relay and UI
- NodePort: Exposes Hubble UI on port 31235
- Readiness Wait: Waits for Cilium DaemonSet rollout
Example
Output
Configuration
Cilium is installed with:Istio Coexistence
Key settings for Istio compatibility:cni.exclusive=false: Allows CNI plugin chainingsocketLB.hostNamespaceOnly=true: Prevents traffic redirection conflictskubeProxyReplacement=false: Safer mode for service mesh
Hubble Access
After installation:Use Cases
- eBPF-based networking
- Network policy enforcement
- Network observability
- Service load balancing
- Kubernetes CNI replacement
Related Commands
- bootstrap-full - Includes Cilium installation
- istio-install - Install after Cilium
- Hubble commands - Network observability
argocd-bootstrap
Bootstrap ArgoCD for GitOps continuous delivery.Syntax
Behavior
- Build Manifests: Generates nixidy manifests
- Create Namespace: Creates
argocdnamespace - Apply Manifests: Server-side apply with conflict resolution
- Wait for Ready: Waits for ArgoCD server deployment
- Display Credentials: Shows initial admin password
Example
Output
Access ArgoCD
ArgoCD CLI
Use Cases
- GitOps continuous delivery
- Declarative application management
- Multi-environment deployments
- Automated sync from Git
- Application health monitoring
Related Commands
- bootstrap-full - Includes ArgoCD
- gen-manifests - Generate ArgoCD apps
load-otel-collector-image
Build and load custom OpenTelemetry Collector image into kind cluster.Syntax
Modes
Build OTel Collector image using Nix (does not load into kind)
Load existing OTel Collector image into kind cluster
Try to fetch from R2 cache, fallback to local build (does not load into kind)
Smart fetch/build + load into kind (default)
Examples
Build Modes
Linux
macOS
R2 Cache
IfR2_BUCKET_URL is configured, the command:
- Computes hash from
flake.nixandflake.lock - Checks local cache:
.cache/otel-collector-<hash>.tar - Tries to fetch from R2:
${R2_BUCKET_URL}/${arch}/${hash}.tar - Falls back to local build if cache miss
Use Cases
- Custom OTel Collector configuration
- Include custom processors/receivers
- Optimize image size
- Cache builds for faster bootstrap
Related Commands
- bootstrap - Automatically loads OTel image
- bootstrap-full - Includes OTel image
benchmark
Run bootstrap benchmark for performance analysis.Syntax
Arguments
Bootstrap mode:
bootstrap or full-bootstrapNumber of benchmark iterations
Options
Keep previous benchmark logs instead of cleaning them
Show help message
Examples
Output
Benchmark Workflow
For each run:- Teardown: Destroys existing cluster
- Bootstrap: Runs bootstrap script with timing
- Metrics: Collects phase timings and resource usage
- Logs: Saves detailed logs to
logs/benchmark/
Output Files
Summary Statistics
The summary includes:- Mean, median, min, max for each phase
- Total execution time statistics
- Resource usage (CPU, memory)
- Platform information
Use Cases
- Performance optimization
- Regression testing
- Compare bootstrap modes
- Validate infrastructure changes
- CI/CD performance tracking
Pre-flight Checks
The benchmark validates:- Docker installed and running
- kind installed
- kubectl installed
- Docker daemon accessible
nix-check
Fast Nix expression sanity check.Syntax
Behavior
- Detects current system architecture
- Evaluates nixidy environment package
- Reports success or failure
- Does NOT build (evaluation only)
Example
Output
Use Cases
- Validate syntax before building
- Quick feedback during development
- Pre-commit hook validation
- CI/CD nix validation
Performance
- nix-check: ~1-2 seconds (evaluation only)
- nix build: ~30-60 seconds (full build)
nix-check for rapid iteration, then gen-manifests for full build.
Related Commands
- gen-manifests - Full nix build
- fix-chart-hash - Fix build errors
Command Dependencies
Installation Order
Bootstrap Includes
- bootstrap: cluster-up, gen-manifests, load-otel-collector-image
- bootstrap-full: cluster-up, cilium-install, istio-install, argocd-bootstrap, gen-manifests, load-otel-collector-image