Skip to content

Instantly share code, notes, and snippets.

@ahmedig
Created June 26, 2018 01:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahmedig/0f8813033f2ccde1dc3444fd79ac9ce9 to your computer and use it in GitHub Desktop.
Save ahmedig/0f8813033f2ccde1dc3444fd79ac9ce9 to your computer and use it in GitHub Desktop.
AKS commands.
az group create --name "rg-minecraft-ig" -l australiaeast
az aks create --resource-group "rg-minecraft-ig" -n kubahmed -c 1 --generate-ssh-keys -l australiaeast
aks get-credentials --name kubahmed -g rg-minecraft-ig
D:\Work\Trainings\OpenHack\yaml
λ kubectl apply -f .
# Run the services, and ping every 2 seconds
kubectl get services -w
#Browse AKS dashboard
az aks browse --resource-group rg-minecraft-ig --name kubahmed
# Create a disk
az disk create --name "md-ig-minecraft" --resource-group rg-minecraft-ig --size-gb 1
# To see the logs of a pod
Kubectle logs <Name of the pod>
# To run bash scripts in the pod
Kubectl exec <Node Name> bash
# Expand the number of nodes
az aks scale --name kubahmed -c 3 -g rg-minecraft-ig
kubectl log minecraftgame-deployment-9cfd79948-4snfl
# Get the OMS agent
kubectl get ds omsagent --namespace=kube-system
# Create a registry, and pull the container from the registry using YAML
https://medium.com/@pjbgf/azure-kubernetes-service-aks-pulling-private-container-images-from-azure-container-registry-acr-9c3e0a0a13f2
# Have a look at the config
kubectl config view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment