Last active
March 12, 2019 06:40
-
-
Save zeerorg/f6ae09ee6a405247ea544476131d0a06 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment