git clone https://github.com/listonb/azure-amazonlinux-demo.git
cd azure-amazonlinux-demo
export RESOURCE_GROUP=amazonlinuxdemo
export LOCATION=eastus
export CLUSTER_NAME=amazonlinux
export DNS_PREFIX=$CLUSTER_NAME
az group create -l $LOCATION --name $RESOURCE_GROUP
az acr create --resource-group $RESOURCE_GROUP --name $CLUSTER_NAME --sku Basic --admin-enabled true
az acr credential show --name $CLUSTER_NAME --query "join(' ', ['docker login $CLUSTER_NAME.azurecr.io -u $CLUSTER_NAME', '-p', passwords[0].value])" -o tsv | sh
az acs create --orchestrator-type=kubernetes --resource-group $RESOURCE_GROUP --name=$CLUSTER_NAME --dns-prefix=$DNS_PREFIX --generate-ssh-keys
az acs kubernetes install-cli
az acs kubernetes get-credentials --resource-group=$RESOURCE_GROUP --name=$CLUSTER_NAME
kubectl get nodes
Build docker container that has basic HTTP server written in go outputing the contents of /etc/system-release
docker build . -t azure-amazon-linux
docker tag azure-amazon-linux $CLUSTER_NAME.azurecr.io/azure-amazon-linux:latest
docker push $CLUSTER_NAME.azurecr.io/azure-amazon-linux:latest
docker images
kubectl run $CLUSTER_NAME --replicas=2 --image $CLUSTER_NAME.azurecr.io/azure-amazon-linux --port=80
kubectl describe deployment $CLUSTER_NAME
kubectl expose deployments $CLUSTER_NAME --port=80 --type=LoadBalancer
kubectl get svc $CLUSTER_NAME
az acs scale --name $CLUSTER_NAME --resource-group $RESOURCE_GROUP --new-agent-count 6
kubectl get nodes
kubectl scale --replicas=6 deployment/$CLUSTER_NAME
kubectl describe deployment $CLUSTER_NAME