Skip to content

Instantly share code, notes, and snippets.

@ams0
Last active May 12, 2022 18:25
Show Gist options
  • Save ams0/df7a89a3357995f81db0cd74c9376588 to your computer and use it in GitHub Desktop.
Save ams0/df7a89a3357995f81db0cd74c9376588 to your computer and use it in GitHub Desktop.
#Arc+Gitops in AKS
#Prep:
az config set extension.use_dynamic_install=yes_without_prompt
az extension add --name k8s-extension
az extension add --name k8s-configuration
az extension add --name aks-preview
RG=resources
CLUSTER=arc
ENV=dev
REPO="https://github.com/ams0/aks-tf-pipeline.git"
BRANCH="dev"
az k8s-configuration flux create -g ${RG} \
--cluster-name ${CLUSTER} \
--name ${ENV}-${BRANCH}-config --cluster-type managedClusters \
--sync-interval 30s --ns cluster-config -s cluster \
-u ${REPO} --branch ${BRANCH} \
--kustomization name=infra path=./src/gitops/environments/${ENV}/infra/ prune=true sync_interval=30s \
--kustomization name=apps path=./src/gitops/environments/${ENV}/apps/ prune=true sync_interval=30s dependsOn=infra \
--only-show-errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment