Azure / Azure/azure-functions-host
Deploying to K8s
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 38
Description
#### Is your question related to a specific version? If so, please specify:
it is not
#### What language does your question apply to? (e.g. C#, JavaScript, Java, All)
C#
#### Question
I have a function, that runs locally as well as locally in a docker container. I would like to deploy it to k8s with my helm chart. When I do that however I notice I need to manually set environment variables, for example:
WEBSITE_SITE_NAME (which I could figure out myself)
or
HTTP_LEADER_ENDPOINT (which I am not sure what value to set)
At the moment I would like to deploy the function without a container in AKS, and I have our own container registry (not ACR), hence it is unclear how I could use `func deploy` or `func kubernetes deploy` commands.
Would you have a suggestion on what environment variables need to be set (with suggestion on values) so I can run the function as a single instance on k8s?
Is it a good idea to set KUBERNETES_SERVICE_HOST to empty string to disable leader election and using the storage account instead? (asking this based on the changes in https://github.com/Azure/azure-functions-host/pull/7327 )
Well I realize I cannot set KUBERNETES_SERVICE_HOST ... so maybe instead setting MANAGED_ENVIRONMENT?
cc. @yojagad and @pragnagopa
Contributor guide
Research direction
Start by reviewing the linked Azure Functions host PR 7327 and the deployment paths named in the issue: func deploy, func kubernetes deploy, Helm, and AKS. Determine whether the project documents the required environment variables and supported non-ACR deployment flow; done would be a clear, maintainable answer or documentation update covering single-instance Kubernetes deployment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp, helm, kubernetes
- Domain
- cloud, devops, infrastructure
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100