Deploy StackAI into your Kubernetes cluster with StackAI BYOC (Bring Your Own Cloud).
brew install az terraform helm fluxcd/tap/flux
az login
- Check flux defaults on flux-bootstrap-aks.sh
- Customize your AKS cluster name
cluster_name
on variables.tf - Customize your AKS user sufix
user_suffix
on variables.tf
Generate a personal access token on GitHub. The required scopes are repo
, admin:public_key
, and admin:repo_hook
- the form is pre-filled for quick setup with the link above.
# set the generated token as an environment variable
export GITHUB_TOKEN=[your-fine-grained-token-here]
# Bootstrap SOPS (Secrets OPerationS)
./sops/scripts/bootstrap-sops.sh
# Initialize Terraform
cd terraform/aks
terraform init
terraform apply -auto-approve
If you encounter SOPS decryption errors:
# Validate SOPS key consistency
cd terraform/aks
./scripts/validate-sops-keys.sh
# Recreate all secrets with current key (interactive)
export SOPS_AGE_KEY_FILE="../../sops/key.age"
./scripts/recreate-sops-secrets.sh
Check Flux status and force reconciliation:
# Check all Kustomizations
flux get kustomizations -A
# Force reconciliation
flux reconcile ks -n flux-system flux-system --with-source
flux reconcile ks -n flux-system configuration-setup
The create_login_user
script has been improved with longer timeouts. If it still times out:
# Check what's failing
kubectl get pods -A
flux get kustomizations -A
# Manually run the login user creation
cd terraform/aks
export KUBECONFIG=./kubeconfig_*
./scripts/create_login_user.sh
Enable and request just-in-time access for Azure Managed Applications