0

By default, functions deployed to OpenFaaS are available at one of the following endpoints:

  1. http://$IP:8080/function/[function_name]
  2. http://$IP:8080/async-function/[function_name]

How can I create an endpoint like the following?

http://[my_domain]/api/v1/[function_name]

Matthew Rankin
  • 457,139
  • 39
  • 126
  • 163

1 Answers1

1

How are you running OpenFaas? Assuming you are running in Kubernetes, you'll need an Ingress for your functions (so that they can be accessible outside your cluster).

There are a bunch of Ingress options:

  1. Follow Alex's example here, this is end-to-end, which I found very helpful.
  2. Use the openfaas ingress operator. More detail here.
  3. Use an API Gateway like Kong, which is what I do. Kong is super flexible. This sample shows you how to use HMAC, but also has links to configuring JWT.
  4. Use another supported OpenFaas Ingress; I have not tried these.

If you are not running in Kubernetes, let me know, and I'll see what I can do.

Kyle
  • 199
  • 1
  • 3