brew install faas-cli
faas-cli template store list
faas-cli list
#faas-cli describe <FUNCTION_NAME>
faas-cli describe node-hello-world
brew install arkade
arkade install openfaas
arkade info openfaas
kubectl rollout status -n openfaas deploy/gateway
kubectl port-forward -n openfaas svc/gateway 8080:8080
PASSWORD=$(kubectl get secret -n openfaas basic-auth -o jsonpath="{.data.basic-auth-password}" | base64 --decode; echo)
echo -n $PASSWORD | faas-cli login --username admin --password-stdin
# kubectl get pods -n <NAMESPACE>
kubectl get pods -n openfaas-fn
# faas-cli new <FUNCTION_NAME> --lang <TEMPLATE>
faas-cli new node-hello-world --lang node12
Make sure in the
node-hello-world.yml
file you changed theimage
attribute and pointed it to the correct registry path.
# faas-cli build -f <FUNCTION_NAME>.yml
faas-cli build -f node-hello-world.yml
# faas-cli push -f <FUNCTION_NAME>.yml
faas-cli push -f node-hello-world.yml
# faas-cli deploy -f <FUNCTION_NAME>.yml
faas-cli deploy -f node-hello-world.yml
# faas-cli up -f <FUNCTION_NAME>.yml
faas-cli up -f node-hello-world.yml
# faas-cli rm -f <FUNCTION_NAME>.yml
faas-cli rm -f node-hello-world.yml
faas-cli list
# faas-cli describe <FUNCTION_NAME>
faas-cli describe node-hello-world
https://chaoscodes.github.io/2019/06/11/My-first-try-in-OpenFass/