mirror of https://github.com/knative/func.git
|
||
---|---|---|
appsody | ||
client | ||
cmd | ||
docker | ||
k8s | ||
kn | ||
knative | ||
kubectl | ||
.gitignore | ||
README.md | ||
go.mod | ||
go.sum | ||
main.go |
README.md
faas
Function as a Service CLI
Setup and Configuration
With Go 1.13+ installed, build and install the binary to your path:
go install
Install dependent binaries:
appsody
https://appsody.dev/docs/installing/installing-appsodykn
https://github.com/knative/client/releaseskubectl
https://kubernetes.io/docs/tasks/tools/install-kubectl/docker
https://docs.docker.com/get-docker/
Configure Boson appsody stack repository:
appsody repo add boson https://github.com/boson-project/stacks/releases/latest/download/boson-index.yaml
Configure Image repository:
Both the image repository and user/org namespace need to be defined either by
using the --registry and --namespace flags on the create
command, or by
configuring as environment variables. For example to configure all images
to be pushed to quay.io/alice
, use:
export FAAS_REGISTRY=quay.io
export FAAS_NAMESPACE=alice
Cluster connection:
It is expected that kubectl and kn be configured to connect to a kubernetes cluster with the following configuration:
- Knative Serving and Eventing
- Knative Domains patched to enable your chosen domain
- Knative Network patched to enable subdomains
- Kourier
- Cert-manager
see https://github.com/lkingland/config for cluster setup and configuration details.
Usage
See help:
faas
Examples
Create a new Service Function:
> mkdir -p example.com/www
> cd example.com/www
> faas create go
https://www.example.com
> curl https://www.example.com
OK