This package converts the 'functions.metadata' file, generated for 'dotnet-isolated' Azure Function worker runtime, into multiple 'function.json' files, similarly to what is generated for in-process 'dotnet' worker runtime. It can be used as a workaround until 'func kubernetes deploy' supports the isolated .NET worker runtime. See https://github.com/Azure/azure-functions-core-tools/issues/2825
$ dotnet add package Az.Functions.MetadataToJsonThis package is a band-aid to fix an issue with Azure Functions Core Tools not recognizing functions metadata for projects with dotnet-isolated worker runtime when deploying to Kubernetes.
See the original issue here: https://github.com/Azure/azure-functions-core-tools/issues/2825
Apparently, the Kubernetes deployment part of the function tools was not updated to support dotnet-isolated worker runtime yet since it still looks for function.json files which are not being generated with the new runtime.
That being said, the functions metadata still gets created in the functions.metadata file which is essentially an array of objects with similar to function.json structure.
This package adds a post-build action to your functions project that splits the new functions.metadata file into multiple function.json-s, each in its own folder, similarly to what the in-process SDK generates.
This helps Azure Functions Core Tools identify that metadata and properly generate Kubernetes deploy yaml files.
Add a reference to this package in your Azure Functions project:
<ItemGroup>
<PackageReference Include="Az.Functions.MetadataToJson" Version="1.0.1" />
</ItemGroup>
After that, the func kubernetes deploy --csharp should work as expected.