Use Connection Strings from Function App configuration in Docker Image for Deployment on AKS (using KEDA)

Anchitaa Gupta 1 Reputation point

We have our functions written in DOTNET running on Function App. We need to containerize the same and deploy on Kubernetes (AKS). The problem is with passing environment values to it in AKS. We can pass the Application Settings in Function App under Configuration as secrets in AKS but I am not abele to figure out a way to pass Connection Strings being used as parameters to the image we deploy in AKS.

For a better picture,

How do I use parameters under Connection Strings in Kubernetes? Is there a way to pass these parameters at runtime to the docker image in AKS without having to change the underline code?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,226 questions
Microsoft Technologies based on the .NET software framework.
3,350 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,852 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 19,686 Reputation points

    Hi @Anchitaa Gupta

    Welcome to Microsoft Q&A! Thanks for posting the question.

    With AKS, the environment variables are defined in the POD configuration using the env: field. Please refer to Define Environment Variables for a Container for more details.
    You may also refer to this article for usage sample and deployment quick start to AKS.

    Please let me know if you have any questions.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.

    1 person found this answer helpful.