Azure function deployment in KEDA/AKS

332 Views Asked by At

I have an azure function written in node js, triggered by a new message in Azure storage queue. It is working fine locally. My goal is to trigger function pod only if there is a message in queue. So, I am attempting to deploy my function to AKS cluster that has KEDA on it. I am using 'func kubernetes deploy' command, and it is failing in building image with below error.

func kubernetes deploy --name resizeimagesfunctionfromqueuestrigger --registry $MYACR Running 'docker build -t functionqueuestrigger:latest /Users/WorkSpaces/visualStudioCode WS/pod6_fromQueues_manual'..done Error running docker build -t splseaacr/resizeimagesfunctionfromqueuestrigger:latest /Users/Documents/Pavan/WorkSpaces/visualStudioCode WS/pod6_fromQueues_manual. output: "docker build" requires exactly 1 argument. See 'docker build --help'. Usage: docker build [OPTIONS] PATH | URL | - Build an image from a Dockerfile

I have dockerfile from where I am running this command. My understanding is 'docker build -t' accepts two parameters - first parameter is repository name with a tag and second is either '.' or the path where docker file lives in our local. So, 'func kubernetes deploy' command is internally generating 'docker build -t' with my repository and then current path, but still it is giving error as it requires only one argument. My laptop is MAC and using Azure func-cli version 4, also tried with version 3, and both of them resulted same. Did any one experienced this and know any solution or any suggestions. Thanksenter image description here

1

There are 1 best solutions below

1
On

Try giving space between manual and '.' as it might be taking the '.' as the part of the address.

As the following error is received when the command is not being able to find the address.

The command should look like this:

docker build -t functionqueuestrigger:latest /Users/WorkSpaces/visualStudioCode WS/pod6_fromQueues_manual  .