Q: Deployment options for FN Project Cluster

112 Views Asked by At

I was fooling around with FN and so far it looks pretty need. Just one thing I couldn't really find in the documentation concerns the deployment to a production cluster.

I saw that a normal function deployment would be done via fn deploy. This would always deploy to localhost:8080 as far as I can see. But how about in a production cluster?

Let's say there is a running cluster on a different port. How would you deploy a function to a certain cluster? Does it spread manually? How is this managed?

Thanks a lot in advance.

1

There are 1 best solutions below

0
On

You may set the variable FN_API_URL to change the cluster that a function is deployed to. An example would be:

$ FN_API_URL=https://my.fn.com:443 fn deploy

If you need to manage functions across multiple deployments or want a more robust way of managing this than an env var, you can also use context files in various capacities, which are documented here: https://github.com/fnproject/cli/blob/master/CONTEXT.md