Azure Functions in Kubernetes deployment via

Lev Goronshtein 41 Reputation points
2022-06-02T23:01:57.65+00:00

Hello,

What is the best way and most appropriate way to deploy Azure functions on Kubernetes? If i am using an automation platform, does it need to make a call to a box that has the core tools deployed so that it can execute the "func kubernetes deploy" commands? or can i have my developers build the code in VS, commit it to GitHub, and through a CICD pipeline i can build the container and push it to ACR as an example and then deploy it using a predefined yaml file?

also if i am deploying http triggers, do i need a azure storage account that is created when deploying to an on-premis K8s deployment and not on Azure?

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,929 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. MughundhanRaveendran-MSFT 12,506 Reputation points
    2022-06-07T10:44:16.247+00:00

    @Lev Goronshtein ,

    The simplest way to deploy Azure function to AKS is via CLI, function core tools. You can build a docker image and push it to either docker hub or Azure container registry. Then use the below command to deploy to Azure kubernetes
    func kubernetes deploy --name <name-of-function-deployment> --registry <container-registry-username>

    You can also deploy from a private registry. Please refer the following articles for more details about deploying functions to kubernetes

    https://learn.microsoft.com/en-us/azure/azure-functions/functions-kubernetes-keda#deploying-a-function-app-to-kubernetes

    https://github.com/Azure/azure-functions-core-tools#deploy-to-kubernetes

    For a http trigger function, deploying to on-prem Kubernetes doesnt need a storage account.

    I hope this helps!

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

    0 comments No comments

  2. Lev Goronshtein 41 Reputation points
    2022-06-13T19:25:38.727+00:00

    Hi @MughundhanRaveendran-MSFT ,

    What if i wanted to use an automation tool such as Nutanix Calm that can call API's and also perform KubeCTL commands as well. Do i still need to use func commands to deploy anything? could i not write my own yaml file, point it to the correct container registry, and do a traditional deployment such as kubectl create -f xyz.yaml -n namespace.

    0 comments No comments

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.