Getting started with Azure CLI for Kubernetes

Search for a command to run...

No comments yet. Be the first to comment.
Introduction Argo Workflows is an open-source workflow orchestration tool for Kubernetes. In this tutorial, we will walk through the steps to install Argo Workflows on a Kubernetes cluster and access its server UI. Step 1: Check Current Context Befor...

The Azure CLI is a powerful tool for managing and automating tasks in Azure. To use the Azure CLI, you need to log in to your Azure account. In this blog, we will go over the different methods you can use to log in to Azure using the Azure CLI. Log i...

Connecting to an Azure VM from windows can be a bit tricky and you may get errors like WARNING: UNPROTECTED PRIVATE KEY FILE! Permissions for ' ' are too open, It is required that your private key files are NOT accessible by others This private key w...

A methodology where all the configurational and/or infrastructure codes are set up in a separate single repository is known as GitOps. This suits tools like Ansible, Terraform and Kubernetes, where they do require separate files for their configurati...

Straight to the point, there are tons of things to ask in JS, but these are a few of them which can be a quick refresher. Event loop, Single-threaded programming language - Explain, Asynchronous and synchronous, Promises and callbacks, "This" ke...

If you prefer to run your azure commands on your local machine, instead of the cloud shell, This blog will help you to start setting up.
Okay, that was a very long sentence🤪, please don't mind.
First things first,
We have two options - Refer here
I am going with the second option. If you have doubts on first, ask in the comments below or kindly dm me.
I chose 2 since, the container is going to be Linux based and isolated from my local machine which can be anything ( Mine is windows )
The first step is to run docker in your machine, we are about to pull an image and run it.
Once docker started, you can proceed with the command below.
docker run -it mcr.microsoft.com/azure-cli
This pulls an image from MCR (Microsoft Container Registry). The image is specifically for using Azure-CLI.
Once it is installed, open the container - A terminal will popup from the container.
You can check that it is a real Linux terminal🤪 by using "ls" or any other commands you remember of.
Once you are back, login to azure through the terminal using the below command.
az login
This will prompt a browser window asking for a code which was already displaying in your terminal.
Once you login, you will get some weird JSON like output.
Once logged in you can explore by using any azure products using the command below
az ____
The __ implies that you can use any azure product like "vm" or "aks" or anything else.
Example
az vm
az vm list
Read below, if you want to setup AKS - Kubernetes.
az aks get-credentials --resource-group yourResourceGroupName --name yourClusterName
The cluster name and the resource group name can be found in your portal if you have already created a cluster in kubernetes, else create one and use it here.
So that's it for the blog, let me know what do you think and comment down if you have a doubt.
Have a great day, people!
Tataaa!