(Optional) Enable GitOps addon and use it to deploy applications
-
Fork this repository on your personal GitHub account.
-
Create a personal access token that has write permission to repositories (select
repo
under permissions). -
Export your GitHub access token, username, and your forked repository:
export GITHUB_TOKEN=<your-token> export GITHUB_USER=<your-username> export GITHUB_REPO=<your-repo>
-
Run the following commands:
az feature register --namespace Microsoft.ContainerService --name AKS-ExtensionManager az provider register --namespace Microsoft.Kubernetes az provider register --namespace Microsoft.ContainerService az provider register --namespace Microsoft.KubernetesConfiguration az extension add -n k8s-configuration az extension add -n k8s-extension
-
Enable GitOps extension:
az k8s-extension create --cluster-type managedClusters \ --cluster-name aks-dapr-workshop-java \ --name myGitopsExtension \ --extension-type Microsoft.Gitops
-
Apply Flux configuration:
az k8s-configuration flux create -c aks-dapr-workshop-java -n dapr-workshop-java-flux --namespace cluster-config -t managedClusters --scope cluster -u $GITHUB_REPO --branch main --kustomization name=test path=./deploy prune=true --https-user $GITHUB_USER --https-key $GITHUB_TOKEN
-
verify all application pods are running by executing the following command:
kubectl get pods
.