Accelerate your AKS applications with Azure Cache for Redis
Published Sep 26 2023 05:41 AM 3,068 Views

The landscape of cloud computing is evolving rapidly and more organizations are transitioning towards modern microservices architectures. Kubernetes has become the foundation to achieve scalability and blazing fast performance. Azure Kubernetes Service has emerged as a powerful solution, providing a robust and managed Kubernetes environment. As applications scale and demand for faster data access intensify, the need for efficient data caching mechanism becomes apparent. Azure Cache for Redis, a fully managed, open-source compatible, in-memory data store fits the bill!

Since Redis is an open-source caching technology, application developers could choose to provision Redis to run on their AKS clusters. However, this option demands developer efforts for overall upkeep and maintenance. Choosing Azure Cache for Redis drastically reduces the operational overhead. Here are some more benefits of choosing managed Redis:

1. Seamless, in-place updates and scaling: Choosing Azure Cache for Redis drastically reduces operational overall and guarantees regular automated updates. You get the benefit of easy scaling your caches in-place to keep up with your growing workloads.

2. Sophisticated BCDR story: Advanced features like active geo-replication, zone redundancy, easy data persistence configuration guarantee extremely high availability of managed Redis instance.

3. Better security options: Various network isolation offerings like private link, firewall rules, along with password-less, AAD token-based authentication provide better security posture for your applications.         

4Seamless integration with Azure Functions: The ability to trigger Azure Functions from data events in Redis unlocks a variety of scenarios for synchronization of data between Azure Cache for Redis and the database you choose.

5. Out of the box, native Azure monitoring and alerting


This blogpost is a collection of tutorials and code samples to help you get started with using Azure Cache for Redis with your AKS hosted applications.

1. Connect an AKS hosted application to Azure Cache for Redis instance

In this tutorial, you will learn how to configure the popular AKS getting started sample to work with Azure Cache for Redis instead of hosting Redis in a container on your AKS cluster.


2. Leverage active data replication across regions offered by Azure Cache for Redis Enterprise

In this tutorial, you will learn how to leverage the powerful active geo-replication offered by Azure Cache for Redis Enterprise instances. You will simulate a production scenario where you have two instances of your website hosted in on AKS clusters in two different regions. These websites in different regions synchronize inventory data by leveraging active data replication.


3. Manage your Azure Cache for Redis instances with Kubernetes tooling

Azure Service Operator offers seamless automation to provision and manage your Azure Cache for Redis instance along with your Kubernetes application.

This tutorial guides you through the modifications required to run the popular AKS getting started voting sample using Azure Service Operator. In the azure-vote-managed-redis.yaml file, you will notice specs to create Azure namespace and Azure Cache for Redis instance co-located with the deployment specs for your application. Applying this single file to your Kubernetes cluster will create an Azure Cache for Redis instance and inject the hostname and access keys for Redis into your application pod as secrets, thus eliminating various manual steps required for managing access to your Redis instance.


4. AKS Landing Zone Accelerator for Azure Cache for Redis Enterprise

Azure Landing Zone Accelerators are architectural guidance, reference architecture, reference implementations and automation packaged to deploy workload platforms on Azure at Scale and aligned with industry proven practices. You can find Bicep templates to deploy Azure Cache for Redis Enterprise securely with your AKS cluster here.


Stay tuned for more code samples of how to connect to Azure Cache for Redis from AKS applications using Microsoft Entra authentication!


Version history
Last update:
‎Sep 26 2023 09:47 AM
Updated by: