Spring Boot PetClinic Microservices Application Deployed to Azure Kubernetes Service (AKS)
[!NOTE]
For Spring Boot Microservices Applications, we recommend using Azure Spring Apps. However, you can still use Azure Kubernetes Services as a destination. See Java Workload Destination Guide for advice.
Description
In this sample app template of the PetClinic Microservices application (a Spring Boot based app). Each of the Application Microservices are containerized and deployed to an Azure Kubernetes Service (AKS) cluster secured by Azure Firewall
Deploy Spring Boot apps using Azure Services:
Tech stack:
- Azure
- Azure Infra (Hub & Spoke Toppology)
- Azure Infra (VNet Peering)
- Azure User Defined Routing (UDR)
- Azure Application Inisghts
- Azure Log Analytics
- Azure Application Gateway
- Azure Fire Wall
- Azure Bastion
- Azure Container Registry (ACR)
- Azure Kubernetes Service (AKS) Cluster
- Azure PostgreSQL DB
- Github Actions
- Bicep
- Docker
- Maven
- Springboot
Introduction
This is a quickstart template. It deploys the following:
Refer to the App Templates repo Readme for more samples that are compatible with azure dev cli.
Prerequisites
- Local shell with Azure CLI installed or Azure Cloud Shell
- Azure Subscription, on which you are able to create resources and assign permissions
- View your subscription using
az account show
- If you don't have an account, you can create one for free.
Getting Started
Fork the repository
-
Fork the repository by clicking the 'Fork' button on the top right of the page.
This creates a local copy of the repository for you to work in.
-
Configure GITHUB Actions: Follow the instructions in the GITHUB_ACTIONS_CONFIG.md file (Located in the .github folder.)
-
Run the workflow
- If workflows are enabled for this repository it should run automatically. To enable the workflow run automatically, Go to Actions and enable the workflow if needed.
- Workflow can be manually run
- Under your repository name, click Actions .
- In the left sidebar, click the workflow "Build and Deploy Application".
- Above the list of workflow runs, select Run workflow .
- Use the Branch dropdown to select the workflow's main branch, Click Run workflow .
Pet Clinic Website
Congratulations! Now you have your containerized Java Sping Boot App deployed on AKS with supported JDK pushed to your ACR.
Pet Clinic Website - IP Address
-
If you wish to view the PetClinic Deployment, you have the following options:
- Log into the Azure Portal
- Nagivate the the "petclinic_spoke_eastus" Resource Group
- Select the AKS Cluster
- At the top of the page select "Connect" and follow the instructions listed on the Connect to AKS-petclinic