Hello,
I was trying to use function tools to deploy an azure function to our cluster and ran into a chicken and egg issue when trying to do "func deploy"
when I try to do:
func deploy --platform kubernetes --name <my-func> --registry <registry-name>
I get an error saying:
Error running kubectl delete deployment <my-func>-deployment --namespace azure-functions.
output: Error from server (NotFound): deployments.extensions "<my-func>-deployment" not found
If I retry, or manually create a deployment of that name and then retry, I will get an error saying:
Error running kubectl create ns azure-functions.
output: Error from server (AlreadyExists): namespaces "azure-functions" already exists
Looks like the issue maybe that we aren't checking if a deployment exists before we try to delete it. I found the following code in https://github.com/Azure/azure-functions-core-tools/blob/cfde63b40651ad7c49f7368d62a90fa5c8f24b89/src/Azure.Functions.Cli/Actions/DeployActions/Platforms/KubernetesPlatform.cs :
private async Task DeleteDeploymentIfExists(string name, string nameSpace)
{
await KubectlHelper.RunKubectl($"delete deployment {name} --namespace {nameSpace}");
}
Even though the method says DeleteDeploymentIfExists, I don't see it actually doing that?
thanks for your help with this!
Please use func kubernetes deploy instead of func deploy --platform kubernetes the latter is being deprecated.
I'm not using kubernetes deploy myself, but did just notice that the documentation (README.md) at the root of this repository has dozens of examples with func deploy --platform kubernetes under 'Getting Started on Kubernetes'. You may want to update those to using the new commands. Cheers!
I tried func kubernetes deploy and ran into some other issues. Could you point me to some documentation around using that instead? as timlod mentioned above, all the examples tell us to do func deploy --platform kubernetes instead.
What issues are you running into?
This is the main doc now. I'm working on updating this repo. https://github.com/kedacore/keda/wiki/Using-Azure-Functions-with-Keda-and-Osiris
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.
Please use
func kubernetes deployinstead offunc deploy --platform kubernetesthe latter is being deprecated.
Yes, this works.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I'm not using kubernetes deploy myself, but did just notice that the documentation (README.md) at the root of this repository has dozens of examples with
func deploy --platform kubernetesunder 'Getting Started on Kubernetes'. You may want to update those to using the new commands. Cheers!