Azure Functions Core Tools v4 unable deploy to Kubernetes
See original GitHub issueG:\Projects\funapp2>func --version
4.0.3928
G:\Projects\funapp2>dotnet --version
6.0.100
Here are the steps to reproduce the problem.
mkdir funapp2 && cd funapp2
func init --worker-runtime dotnetIsolated --docker
func new -t "HttpTrigger" -n "Login" -a "anonymous"
Modify the Dockerfile
file as below:
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS installer-env
COPY . /src/dotnet-function-app
RUN cd /src/dotnet-function-app && \
mkdir -p /home/site/wwwroot && \
dotnet publish *.csproj --output /home/site/wwwroot
# To enable ssh & remote debugging on app service change the base image to the one below
# FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0-appservice
FROM mcr.microsoft.com/azure-functions/dotnet-isolated:3.0-dotnet-isolated5.0
ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
AzureFunctionsJobHost__Logging__Console__IsEnabled=true
COPY --from=installer-env ["/home/site/wwwroot", "/home/site/wwwroot"]
Build & Push image
docker build -t willh/funapp2:latest .
docker push willh/funapp2:latest
Deploy my function app with --dry-run
func kubernetes deploy --name funapp2 --service-type NodePort --image-name willh/funapp2 --dry-run
There is only Secret been created.
data:
AzureWebJobsStorage: VXNlRGV2ZWxvcG1lbnRTdG9yYWdlPXRydWU=
FUNCTIONS_WORKER_RUNTIME: ZG90bmV0LWlzb2xhdGVk
apiVersion: v1
kind: Secret
metadata:
name: funapp2
---
Where is the other YAML of the deployment?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:7
- Comments:13 (1 by maintainers)
Top Results From Across the Web
Azure Functions Core Tools v4 unable deploy to Kubernetes
Azure Functions Core Tools v4 unable deploy to Kubernetes ... Here are the steps to reproduce the problem. ... There is only Secret...
Read more >Azure Functions Core Tools
In the Kubernetes dashboard look for the namespace "azure-functions" and make sure that a pod has been deployed sucessfully with your container.
Read more >node.js - Unable to deploy Azure Functions via CLI
I am attempting to deploy my azure functions to a function app using this command. func azure functionapp publish cost-and-usage-functions- ...
Read more >Running Azure Functions within Kubernetes Cluster
With the Docker file created, we are in a position to deploy the function to our Kubernetes cluster with another Azure Function Core...
Read more >Rider - Can't find Azure Functions Core Tools Info
I have installed the Azure Functions Core Tools 4.x as per the Microsoft docs. I even rebooted my machine just to be safe....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I created a PR to resolve this issue inside the functions tooling: #3000
In the meantime, if you want an immediate fix on your project’s side, I also created a helper program that does that. It is published as a NuGet package Az.Functions.MetadataToJson (repo on GitHub)
Just add a reference to it in your project file and it should make the
func kubernetes deploy
work as expected.@MACEL94 It seems nobody watching this repo. I reported a few issues that is been stalled for more than 1 month.