Connect environment variables from Azure AKS to helm using Springboot application

Divyashree 0 Reputation points
2023-01-31T13:13:10.6466667+00:00

Read system environment variable on what stage the application is currently running using Helm in spring boot application for AKS Cluster and instances also its connected to Azure storage account and Azure Storage queue.

Can anyone please help me to resolve this issue using Springboot Java application

Azure Storage Accounts
Azure Storage Accounts
Globally unique resources that provide access to data management services and serve as the parent namespace for the services.
2,733 questions
Azure Queue Storage
Azure Queue Storage
An Azure service that provides messaging queues in the cloud.
98 questions
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS)
An Azure service that provides serverless Kubernetes, an integrated continuous integration and continuous delivery experience, and enterprise-grade security and governance.
1,883 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Roy Kim (Azure MVP) 181 Reputation points MVP
    2023-02-01T02:52:43.6466667+00:00

    You can read a system environment variable in a Spring Boot Java application by using the System.getenv() method. To determine the stage that the application is currently running, you can set an environment variable in the deployment process (e.g., when deploying with Helm to AKS) that holds this information, and then access that variable in your code.

    For example, you could set an environment variable named APPLICATION_STAGE with the value development, staging, or production.

    0 comments No comments