kedacore/sample-hello-world-azure-functions

Failing to deploy function to Kubernetes

NillsF opened this issue · 0 comments

When I follow this sample, I run into issues when deploying to Kubernetes. Things run fine on my machine - but fail when deploying to kube. I tried this both on my Windows laptop as on a Linux machine (with all prereqs installed).

The first error I get is that a deployment doesn't exist - if I run the same deployment again the error refers to the namespace already existing.

Some of the logs I get:

nilfranadmin@webserver:~/hello-keda$ sudo func deploy --platform kubernetes --name hello-keda --registry mcwnfreg.azurecr.io --pull-secret "xxx" --namespace hello-keda4
Building Docker image...
Running 'docker build -t mcwnfreg.azurecr.io/hellokeda /home/nilfranadmin/hello-keda'..done
Pushing function image to registry...
Running 'docker push mcwnfreg.azurecr.io/hellokeda'...done
Error running kubectl delete deployment hello-keda-deployment --namespace hello-keda4.
output: Error from server (NotFound): deployments.extensions "hello-keda-deployment" not found 




nilfranadmin@webserver:~/hello-keda$ sudo func deploy --platform kubernetes --name hello-keda --registry mcwnfreg.azurecr.io --pull-secret "xxx" --namespace hello-keda4
Building Docker image...
Running 'docker build -t mcwnfreg.azurecr.io/hellokeda /home/nilfranadmin/hello-keda'..done
Pushing function image to registry...
Running 'docker push mcwnfreg.azurecr.io/hellokeda'..done
Error running kubectl create ns hello-keda4.
output: Error from server (AlreadyExists): namespaces "hello-keda4" already exists