Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Script to deploy an app in Azure Container Instances through the Kubernetes cluster running in Google Container Engine
# Configure GKE
gcloud container clusters create gke-aci --zone us-west1-a
gcloud container clusters get-credentials gke-aci --zone us-west1-a
kubectl get nodes
# Create an Azure Resource Group & Service Principal
az group create --name gke-aci --location westus
az account list -o table
az ad sp create-for-rbac --role=Contributor --scopes /subscriptions/<subscriptionId>/resourceGroups/gke-aci
az provider register -n Microsoft.ContainerInstance
# Configure Azure Cosmos DB
export DB=tododb$RANDOM
az cosmosdb create --name $DB --kind MongoDB -g gke-aci
az cosmosdb list-connection-strings -g gke-aci --name $DB
export CONNSTR=<Connection_String> # Replace with actual value
# Deploy the ACI Connector
git clone
cd aci-connector-k8s
kubectl create -f examples/aci-connector.yaml
kubectl get pods
kubectl get nodes
# Deploy the web application
kubectl create -f web.yaml
# Verify the creation
kubectl get pod web -o wide | awk {'print $1" " $6" " $7'} | column -t
az container list --query [*].name
az container show --name web -g gke-aci --query ipAddress.ip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.