This is a quick and dirty example of how to create an application specific K3s cluster for use with K3d. This image will start a k3s cluster and launch the Openfaas serverless framework in a local dev type of environment.
- k3d create --image cloudnautique/k3d-openfaas
- Source the kubectl file that is output by the command
export KUBECONFIG="$(k3d get-kubeconfig --name='k3s-default')"
kubectl port-forward svc/gateway -n openfaas 31112:8080 &
- Setup the CLI:
export OPENFAAS_URL=http://127.0.0.1:31112
echo -n password | faas-cli login --password-stdin
- Checkout the platform: https://docs.openfaas.com/deployment/kubernetes/#use-openfaas
checkout this repo:
docker build --rm -t <image> .