curl -sL https://cli.openfaas.com | sh
Install faas-netes provider
git clone https://github.com/openfaas/faas-netes
kubectl apply -f ./faas-netes/namespaces.yml
Create the password for the gateway
PASSWORD=$(head -c 12 /dev/urandom | shasum| cut -d' ' -f1)
kubectl -n openfaas create secret generic basic-auth \
--from-literal=basic-auth-user=admin \
--from-literal=basic-auth-password="${PASSWORD}"
kubectl apply -f ./faas-netes/yaml
Access to the gateway
export OPENFAAS_URL=http://$(minikube ip):31112
echo -n $PASSWORD | faas-cli login --password-stdin
Deploy a sample Python function
pushd ./functions
faas-cli new --lang python hello-python
Important: First, start the Docker daemon, in order to build and (optionally) publish the Docker image artifact
faas-cli build -f ./hello-python.yml
(optional) If configured a registry repo URL (i.e. in ./functions/hello-python.yml):
faas-cli push -f ./hello-python.yml
faas-cli deploy -f ./hello-python.yml
faas-cli up -f ./hello-python.yml