How to retrieve function keys when azure function is deployed in kubernetes

6/17/2020

I deployed azure function in kubernetes following MS DOC. But it doesn't tell me how to retrieve function keys. Previously, the azure function is deployed as stand alone service. I can get a publishProfile. So I'm authorized to call

GET /admin/functions/{functionname}/keys

But in k8s, the call returns 401, because I can't get publishProfile. Is there anything equivalent to publishProfile in k8s?

-- Newton Zou
azure
azure-aks
azure-functions
kubernetes

2 Answers

6/17/2020

When deploying your Azure Function inside Kubernetes, they are now running as Kubernetes Pods and will not show up in Azure Functions anymore.

see this for instruction on how to see your running functions(pods)

https://github.com/kedacore/sample-hello-world-azure-functions#10-add-a-queue-message-and-validate-the-function-app-scales-with-keda

-- djsly
Source: StackOverflow

6/3/2021

Azure Functions are open source. They can be hosted anywhere (even on GCP or AWS). Azure Cloud provides you a managed version of Azure Functions. When you create an azure function app through the portal (or azure cloud SDK) you can see it in the portal.

Now when you deploy Azure Functions in a Kubernetes Cluster, it is equivalent to deploying/hosting Azure Functions on your local machine (or any other cloud provider). Thus, azure functions deployed in Kubernetes Cluster are not part your azure cloud and hence cannot be accessed as a service that azure provides.

-- Chayan Bansal
Source: StackOverflow