Closed yvz5 closed 3 years ago
Hi,
See the documentation for the advanced deployment (using YAML):
https://kubeless.io/docs/advanced-function-deployment/
So far I see a couple of issues with your YAML. function
should be the full URL of the function and the type
should contain the format (e.g. url+text
).
My recommendation for you is to run the kubeless
binary with the options --dryrun
and -o yaml
so you can see a valid YAML and work from there.
Hi, I want to create the function from a file. file://app.js or ./app.js did not work. how do I create the function from a local file ?
That's not exactly how that works. You can either copy the actual content of your app.js
in the function
definition or you can set that field to point to an URL. With that info, Kubeless generates the file locally within the Pod.
I think thats a bit counter productive. In the end, I would like to control everything. The only way to change the service and deployment is through this yaml file. Putting the function code inside is aweful. if kubeless cli could do this, that would be great. Maybe I ll take a look at the cli
@yvz5 you can do this through templating if you're using this inside helm
. But I'm not sure if this is relevant after more than a year
@delanni Thanks for your reply but we moved to azure functions because of these limitations.
Hi there,
I tried creating a function using a yaml file like this:
my function code:
if I use cli to deploy this function, it works perfectly. But if I try kubectl apply -f the pod does not start correctly. Here is the describe from the function pod: