Skip to content

Instantly share code, notes, and snippets.

@viveksyngh
Created August 21, 2018 13:44
Show Gist options
  • Select an option

  • Save viveksyngh/f193b67b0dc5f1de3a0e957d658f4cbd to your computer and use it in GitHub Desktop.

Select an option

Save viveksyngh/f193b67b0dc5f1de3a0e957d658f4cbd to your computer and use it in GitHub Desktop.
Step by Step instructions to Deploy OpenFaaS Operator

Install helm CLI client on your system

On MacOS using Homebrew

$ brew install kubernetes-helm

From script

$ curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh
$ chmod 700 get_helm.sh
$ ./get_helm.sh

Create a service account and a cluster role binding for Tiller

$ kubectl -n kube-system create sa tiller

$ kubectl create clusterrolebinding tiller-cluster-rule \
    --clusterrole=cluster-admin \
    --serviceaccount=kube-system:tiller 

Deploy tiller (Helm server) on your cluster

$ helm init --skip-refresh --upgrade --service-account tiller

Create OpenFaaS namespaces

$ kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml

Generate basic authentication credentials secret

$ 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

Install OpenFaaS with Helm

$ helm repo add openfaas https://openfaas.github.io/faas-netes/

$ helm upgrade openfaas --install openfaas/openfaas \
    --namespace openfaas  \
    --set functionNamespace=openfaas-fn \
    --set serviceType=LoadBalancer \
    --set basic_auth=true \
    --set operator.create=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment