# Script to deploy openfaas in local kubernetes cluster # Step 1 install helm and tiller curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash kubectl -n kube-system create sa tiller \ && kubectl create clusterrolebinding tiller \ --clusterrole cluster-admin \ --serviceaccount=kube-system:tiller helm init --skip-refresh --upgrade --service-account tiller # create namesapce kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml # add repo helm repo add openfaas https://openfaas.github.io/faas-netes/ # set password PASSWORD="something" # deploy kubectl -n openfaas create secret generic basic-auth \ --from-literal=basic-auth-user=admin \ --from-literal=basic-auth-password="$PASSWORD" helm repo update \ && helm upgrade openfaas --install openfaas/openfaas \ --namespace openfaas \ --set basic_auth=true \ --set functionNamespace=openfaas-fn \ --wait export OPENFAAS_URL=http://localhost:31112 echo -n $PASSWORD | faas-cli login -g $OPENFAAS_URL -u admin --password-stdin