Friday, 30 September 2022

Replace String in Variable in Azure DevOps YAML Pipelines

In  Azure DevOps YAML pipelines there are several functions available for you to use. replace is such a useful function, which you can use to replace string segements within a string. Let's look at how we can use replace function to replace contents of a variable. 

Use case would be: For example you have a variable value for your customer api name as cutomer-api.  You may need to use it and generate customer_api value for another variable which you want to use in a namig of resouce, for consitency purpose with _ in naming instead of -.

Tuesday, 27 September 2022

Setup jsonnet-bundler in WSL2

 We need jsonnet-bundler to package the jsonnet projects For example, to generate the required Prometheus rules and Grafana dashboards in kubernetes-mixin project used for Kubernetes monitoring,  requires jsonnet-bundler. Let's see how we can setup jsonnet-bundler in Windows Subsystem for Linux (WSL2) to use it as a package tool.

Friday, 23 September 2022

Resolve "Unable to connect to the server: getting credentials: exec: executable kubelogin not found" in AKS

az aks get-credentials  is used to get the kubeconfig updated so that we can access AKS clusters from a terminal (You need to first use az login and az account set --subscription to connect to your Azure subscription). You may encounter Unable to connect to the server: getting credentials: exec: executable kubelogin not found issue after geting credentials and when trying to execute kubectl commands such as kubectl get namespace. Let's see what we need to do to get the issue resolved.

Friday, 16 September 2022

View More lines in VS Code Integrated Terminal

VS Code might be your favourite development tool to develop in any language in any platform. It has integrated terminals, for PowerShell, comand prompt, Git Bash, WSL  Azure Cloud shell etc. You may find missing teminal logs specially when you run commands producing larger logs for review such as terraform plan or bicep with --what-if. By default integrated terminal in VS Code only displays last 1000 lines. Let's look at how we can increase the number of log lines in the VS code integrated terminal.

Saturday, 3 September 2022

Manually Push .NET App Docker Image to Azure Container Registry

 You might want to do quick test deploying your containers to AKS or Azure App Services, while development is ongoing. I fyou do not have a pipelines setup yet you may need to manually push your docker  images to Azure Contianer Registry (ACR). Let's have a look at the steps need to push a local image built to ACR using docker commands.

Popular Posts