Deploying a Spring Boot REST API on Azure Kubernetes Service with Azure Database for PostgreSQL

Connecting AKS Applications to Azure PostgreSQL with AAD Pod Identities

Yi Ai
codeburst
Published in
4 min readMar 25, 2021

--

Photo by luis gomes from Pexels

In this post, We will look at how to run a Java Spring Boot application on Azure Kubernetes Service (AKS) and connects to Azure PostgreSQL using Azure AD Pod identity. Azure Kubernetes Service (AKS) is a managed Kubernetes service that lets you quickly deploy and manage applications based on microservices.

Azure Active Directory pod-managed identities uses Kubernetes primitives to associate managed identities for Azure resources and identities in Azure Active Directory (AAD) with pods.

What we’ll cover in this post:

  • Create an AKS cluster and Pod Identity.
  • Create an Azure Database for PostgreSQL server.
  • Prepare Java Spring Boot application for AKS.
  • Deploy Azure Container Registry (ACR).
  • Deploy Java application to Kubernetes with Kustomize.

The following diagram shows the architecture of the above steps:

--

--

AWS Community Builder | AWS AZURE GCP Certified Engineer | A Cloud Technology Enthusiast | AWS Certified Security/Machine Learning/Database Analytics Specialty