Skip to content

Instantly share code, notes, and snippets.

@willypelz
Created May 20, 2020 23:38
Show Gist options
  • Save willypelz/43d5c2426cd53db81e404586bd0f3bfa to your computer and use it in GitHub Desktop.
Save willypelz/43d5c2426cd53db81e404586bd0f3bfa to your computer and use it in GitHub Desktop.
Deployment using azure kubernetes container
Command for docker kubernetics installation on azure
version=$(az aks get-versions -l "West Europe" --query 'orchestrators[-1].orchestratorVersion' -o tsv)
Echo $version
az group create --name LFYAPPLICATIONS --location "West Europe”. // creating group resources
az aks create --resource-group LFYAPPLICATIONS --name devteamlagos --enable-addons monitoring --kubernetes-version $version --generate-ssh-keys --location "West Europe”. //creating kebernetics and also setting up the node, pod monitors
az acr create --resource-group LFYAPPLICATIONS --name devteamlagos --sku Standard --location "West Europe”. // 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
ACR_ID=(az acr show --name devteamlagos --resource-group LFYAPPLICATIONS --query "id" --output tsv) // getting id of azure registry
az role assignment create --assignee $CLIENT_ID --role acrpull --scope $ACR_ID //assignment
az sql sever create -l "West Europe" -g LFYAPPLICATIONS -n sqldevteamlagos -u sqladmin -p Devteamslagos2020
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