We discuss how to enable workload identity for continers running in AKS in the post "Setting Up Azure Workload Identity for Containers in Azure Kubernetes Services (AKS) Using Terraform - Improved Security for Containers in AKS". However, when we use DefaultAzureCredentials and try to run docker containers locally from a development machine, we do not have the workload identity support. With Visual Studio we can run with the Azure AD user and run applications successfully. But if we are using a docker run command and run docker container locally, we will have to use app registration/service principal. Then we have to grant the service principal with required roles in Azure resources we would need to access from the application. Let's take a look at an example with Azure app config.
Saturday, 29 June 2024
Tuesday, 11 June 2024
Jump Into a Container Deployed in AKS (kubernetes)
We may sometimes want to jump into a container deployed in kubernetes pod to investigate the conntents of a container, such as files in it or even we may want to run commands and see how they work inside a deployed container. For that purpose we need to jump into the container and obtian the command shell in that container. Let's look at how we can jump into both Linux and Windows containers.
Monday, 3 June 2024
Multiple KEDA Triggers for a Scaled Job with Event Hubs in AKS
Kubernetes scaled job helps us running one job per event/message we recive from the queue/even hub. We can have an event handler job which can handle more than one type of event messages or queue messages. Let's look at what we need to consider when we are defining more than one trigger, with kubernetes event drivern autoscaler (KEDA) for a scaled job.
Thursday, 16 May 2024
Mount Azure Storage Fileshare Created with Terraform on AKS
We can mount Azure file share to containers in AKS as explained in dcumentation here, and we can use static vloume mounting to use existing Azure file share. The documentation only explains how to setup static volume mount with Azure CLI. In this post let's look at stpes for using terraform provisioned Azure file share strage as a static volume mount in AKS, using kuberntes yaml.
Monday, 6 May 2024
FormatterServices.GetUninitializedObject is Obsolete, What can we use instead?
The FormatterServices.GetUninitializedObject is obsolete and shows a warning as shown below if we try to use it in our code. The FormatterServices class is obsolete as per documentation.
What is the alternative for this? Let's find out with an example.
Thursday, 25 April 2024
Installing Mising Fonts in windowsservercore-ltsc2022 Docker Image Using Azure Pipelines with az acr build
The missing fonts in windowsservercore-ltsc2022 docker images can be installed as described in the blog post here. However, when we are not using hosted agents, and when we use kubernetes based self hosted build agents, we do not have access to host machine, to perform the all steps described in the post "Adding optional font packages to Windows containers". Since docker is not supported on self hosted build agent running as container in AKS, we have to use az acr build to build the docker images in such cases. To setup fonts in this kind of a situation in a Azure DevOps pipeline we can take the steps described in this post.
Monday, 15 April 2024
Dynamically Control Matrix of Jobs in GitHub Actions Based on Input Parameter Value
We can use matrix in GitHub Actions to use a single defnition of job to create multiple jobs as described here in the documentation. Let's say we input the list of application names we want to build, as an input parameter to the action workflow, and need to have the ability to remove the items from the app list at the time of triggering it manually (run workflow). For example, we have 4 apps by default. However, when we need we should be able to build only one or two out of them using the same action workflow without having to change, the workflow defintion. In this post let's explore how we can achieve that with GitHub actions workflow, utilizing the matrix strategy, and dynamical setting the matrix value.
Friday, 5 April 2024
Loop Jobs based on Parameter Value in Azure DevOps Pipelines
Consider a situation where we want to perform same set of steps in a pipeline, multiple times. A good example would be building or deloying multiple apps, using same set of steps. Let's explore this example to understand how we can loop through set of pipeline steps, to build multiple apps using a list of app names provided as a parameter in the pipeline.
Popular Posts
-
Let’s look at how we can specify the artifact version to download based on the resource CI build linked to the CD pipeline and check on how ...
-
The hosts file in /etc/hosts is allowing the WSL distros to map IP addresses to domain names before going to domain name servers, similar...
-
Can a Coded UI test executed with a Console Application? Yes it is possible. I am going to explain how it can be done. I am going to exec...
-
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...
-
The new Azure Managed Redis can be deployed with balanced compute and memory with high availability, and useful modules such as RedisJson a...