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

Anchitaa Gupta 1 Reputation point
2022-02-11T12:43:42.12+00:00

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?
173578-image.png

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

1 answer

Sort by: Most helpful
  1. AnuragSingh-MSFT 21,386 Reputation points
    2022-02-14T11:24:15.483+00:00

    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.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.