- Login to Azure using
az login --use-device-codeUse
az login --use-device-code --tenant <tenant>to specify a different tenant-
If you have more than one Azure subscription, select the correct subscription
# verify your account az account show # list your Azure accounts az account list -o table # set your Azure subscription az account set -s mySubNameOrId # verify your account az account show
-
- If you don't already have managed identity set in your subscription, follow these steps to create RG and MI
- Run
flt envand make surePIB_MIis set
# set MY_CLUSTER
export MY_CLUSTER=central-tx-atx-$MY_BRANCH
# create an arc enabled cluster
# it will take about 2 minutes to create the VM
flt create cluster -c $MY_CLUSTER --arc
- CI-CD generates the deployment manifests
- Wait for CI-CD to complete (usually about 30 seconds)
# update the git repo after ci-cd completes
git pull
# add ips to repo
git add ips
git commit -am "added ips"
git push
# check the setup for "complete"
# rerun as necessary
flt check setup
# optional - use the Linux watch command
# press ctl-c after "complete"
watch flt check setup
-
Deploy IMDb app to Arc enabled K3d cluster
# start in the apps/imdb directory cd $PIB_BASE/apps/imdb # deploy to central and west regions flt targets add all flt targets deploy
-
Wait for ci-cd to finish
-
Force cluster to sync
# should see imdb added git pull # force flux to reconcile flt sync
- Get Azure Arc bearer token by running
flt az arc-token - Login to Azure Portal and navigate to
Azure Arcservice - Click on
Kubernetes clustersfrom the left nav and select your cluster - Click on
Workloadsfrom the left nav and place bearer token retrieved earlier - Validate the IMDb app running on the cluster
-
Once you're finished with the workshop and experimenting, delete your cluster
# start in the root of your repo cd $PIB_BASE git pull # delete azure resource flt delete $MY_CLUSTER # remove ips file rm ips # reset the targets cd apps/imdb flt targets clear cd ../.. # update the repo git commit -am "deleted cluster" git push