Skip to content

Instantly share code, notes, and snippets.

@willypelz
Last active May 21, 2020 12:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willypelz/556c4f648a6d92ecce4ee1f7767543fe to your computer and use it in GitHub Desktop.
Save willypelz/556c4f648a6d92ecce4ee1f7767543fe to your computer and use it in GitHub Desktop.
azure kubernetes container with docker
Command for docker kubernetics installation on azure
Steps on using azure registry containers
STEP 1:
Registering(storing the command to check) the version of the the azure container service
version=$(az aks get-versions -l "West Europe" --query 'orchestrators[-1].orchestratorVersion' -o tsv)
STEP 2:
Displaying the version stored(registered/installed)
echo $version
STEP 3
creating group resources
az group create --name LFYAPPLICATIONS --location "West Europe”.
STEP 4
creating kebernetics and also setting up the node, pod monitors
az aks create --resource-group LFYAPPLICATIONS --name devteamlagos --enable-addons monitoring --kubernetes-version $version --generate-ssh-keys --location "West Europe”.
STEP 5
az acr create --resource-group LFYAPPLICATIONS --name devteamlagos --sku Standard --location "West Europe”.
STEP 6
create azure container registry that will be used with kubernetics
CLIENT_ID=$(az aks show --resource-group LFYAPPLICATIONS --name devteamlagos --query "servicePrincipalProfile.clientId"--output tsv) // granting access to kubernetics to access the container registry —— getting id of the service principle
STEP 7
Getting id of azure registry
ACR_ID=(az acr show --name devteamlagos --resource-group LFYAPPLICATIONS --query "id" --output tsv)
STEP 8
assignment of the aks to the to have access to azure container registry
az role assignment create --assignee $CLIENT_ID --role acrpull --scope $ACR_ID
STEP 9
creating a mysql server
az sql sever create -l "West Europe" -g LFYAPPLICATIONS -n sqldevteamlagos -u sqladmin -p Devteamslagos2020
STEP 10
creating a Database
az sql db create -g LFYAPPLICATIONS -s sqldevteamlagos -n mhcdb —service-objective SO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment