This post is part of the post that discusses Azure Kubernetes Service (AKS) Deployment Recepes. I have discussed about how to setup development envionment in Set up development environment, and how to create docker image using a sample application in Create a Docker Image of an Application and the corresponding code can be downloaded from https://github.com/benktesh/LiveStreaming/tree/learnAKS. I also discussed verification of the deployment of sample application into local Kubernetes cluster in Deplyoing an application to Kubernetes. In this post, I am going to use a docker image and deploy the image to a local Kubernetes cluster. I will also illustrate how to interact with Kubectl - a command line interface of kubernetes.
Interacting with Azure
In order to use Azure Container Registry (ACR), I need to have a valid account and subscription in the Azure. Once can visit Azure and create an account if needed.
In order for me to interact with Azure remotely using PowerShell, I have to install Azure Cli. The instruction for installing Azure Cli is availabe at Install Azure CLI on Windows. To verify the status of Azure cli, I can run Az version command in the PowerShell window.
I can login to Azure using Az login, which opens a browser to interactively login to Azure and upon successful login, the command window is populated with a message and list of subscriptions.
Azure command az account list --output table can be used to list all the subscription. az account set --subscription [subscription id] command can be used to select a software where 'subscription' is the id of subscription. az account show --output table shows the currently selected account information.
Now that I have set the account and subscription, I am going to start creating a resource group named 'livestreaming' and in the 'eastus' locations.
I intend put all the resources created under this resource. This appraoch helps me manage the resources better. The next step is to create and use the Azure Container Registry (ACR).
Azure Container Registry (ACR)
az acr repository list -n livestreaming -o table
Summary
- Log In to azure
- Create resource group azure
- Create container registry in the azure
- Log-in to container registry
- Tag the image to be eligible for azure container registry
- Push the image to the container registry
No comments:
Post a Comment