openfaas 10.0.8 · helm/openfaas
GitHub - isennkubilay/openfaas: Introduction to serverless
# generate a random password
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"
helm upgrade openfaas --install openfaas/openfaas \\
--namespace openfaas \\
--set basic_auth=true \\
--set functionNamespace=openfaas-fn \\
--set serviceType=NodePort
kubectl get svc -n openfaas gateway-external -o wide
curl -sSL <https://cli.openfaas.com> | sudo -E sh
export OPENFAAS_URL=ip:nodePort/
echo -n $PASSWORD | faas-cli login -g $OPENFAAS_URL -u='admin' --password='18123artbnq112'
curl -X POST <http://ip:80/function/figlet> -d "Hello openfaas"
faas-cli new --lang python3 astronaut-finder --prefix="kisen"
faas-cli build -f ./astronaut-finder.yml
faas-cli push -f ./astronaut-finder.yml
faas-cli deploy -f ./astronaut-finder.yml
echo | faas-cli invoke astronaut-finder --gateway="ip:nodePort