Setting up OAuth 2.0 authentication for applications in AKS with NGINX and OAuth2 Proxy

Introduction and use cases Today I would like to show how you can set up authentication with OAuth 2.0 for applications that are running in Azure Kubernetes Service with help of NGINX Ingress Controller and OAuth2 Proxy. There may be multiple reasons for why you would want to implement authentication with OAuth 2.0 this way. For example, you may not want to implement authentication logic in the application itself or, like it was in my case, you want to limit access to a third-party application that you鈥檙e running in your cluster in case authentication is not natively supported by the application itself (or requires an Enterprise license for the same馃槂). I was recently working on implementing an open source version of kubecost for cost management in our AKS clusters and the thing is that the open source version of kubecost doesn鈥檛 natively support authentication. You can enable support for SSO with SAML 2.0 by acquiring an Enterprise version of kubecost which was not applicable in my scenario. Nevertheless, I still wanted to expose kubecost instances so that other teams and business stakeholders can easily access those and check whatever data they need. At the same time I still wanted to limit access and protect the application so I had to look for an alternative solution. And that鈥檚 where NGINX Ingress Controller and OAuth2 Proxy come into play!馃樅 ...

July 14, 2022 路 20 min 路 Kristina Devochko

Creating reusable build tasks in Azure DevOps pipelines with templates

Use case for pipeline templates In the world of complex enterprise applications and distributed systems you may have a need to perform many more actions and validations as part of a build pipeline than before: build an application, execute multiple types of tests like unit tests and API tests, perform security validations like SCA, SAST, container image scanning and scanning of third-party dependencies, perform application packaging and deployment, etc. That's when it's worth considering to implement a multi-staged pipeline where you can run several jobs in parallel and control application flow with stages. Each stage may then have it's own set of checks and validations. You may even have multiple applications which have similar build tasks as part of the build pipeline - for instance, if you have multiple .NET Web API applications, it's very likely that build pipelines for those will be similar to some extent. ...

June 24, 2022 路 5 min 路 Kristina Devochko

Handling failed Helm upgrade due to another operation in progress

Introduction Sometimes things may go wrong, also during ugprade of the application that is deployed to a Kubernetes cluster with Helm. When something goes wrong, you fix it and re-try a deployment with the new fix included. But then deployment operation fails with following error message: Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress So, what does it mean and how can you fix it? Let鈥檚 find out! Controlled, manual fix This happens typically when Helm attempts to roll out a new revision of an application and then something goes wrong in the process, like a bug in an application itself or an issue inside the Kubernetes cluster, which causes the new deployment to never get completed. This faulty deployment becomes dangling, therefore preventing all the future deployments to be rolled out. You can easily check the latest deployment status by retrieving the history of application deployments with helm history. ...

June 20, 2022 路 4 min 路 Kristina Devochko

Accelerated Networking for AKS nodes

In this blog post I would like to talk about Accelerated Networking, how it can improve internal communication inside an AKS cluster and how you can enable that for Linux and Windows AKS nodes. But first, let's get the basics straight. What is Accelerated Networking and why use it in AKS? Accelerated Networking (AN) is something that has been around in Azure for a few years now - I think I have read about it for the first time around 2018. Until recently this functionality has been mainly mentioned in terms of classic Azure VMs or Virtual Machine Scale Sets (VMSS). It's not that long ago that the possibility for Accelerated Networking got introduced in Azure Kubernetes Service though, especially if we're talking about Windows nodes. When I tested this back in February 2022, support for AN in Windows nodes in AKS was still in private preview but fortunately, a few months later this has been included as part of standard AKS offering. Now, when you create an AKS cluster or a new node pool, be it Linux or Windows, Accelerated Networking will be enabled automatically for you. And this is a reason for celebration, my friend - you'll understand why when I show you the numbers!馃樇 ...

June 10, 2022 路 13 min 路 Kristina Devochko

Continuous Delivery to AKS with Azure DevOps Environments - Part 2

Welcome to Part 2 of blog post series on Continuous Delivery to Azure Kubernetes Service with Azure DevOps Environments! In Part 1 we looked into what Azure DevOps Environments are, what benefits they provide and how I would recommend to create ADO environments and resources based on my own experience. If you haven't read Part 1, you can check it out here: Continuous Delivery to AKS With Azure DevOps Environments - Part 1. ...

May 23, 2022 路 16 min 路 Kristina Devochko