Skip to content

Instantly share code, notes, and snippets.

@kacole2
Last active September 16, 2019 07:49
Show Gist options
  • Save kacole2/fba60ed2e6f39889220efe225a9e83c9 to your computer and use it in GitHub Desktop.
Save kacole2/fba60ed2e6f39889220efe225a9e83c9 to your computer and use it in GitHub Desktop.
Installing OpenFaaS on Pivotal Container Service (PKS) with Helm

The OpenFaaS documentation for faas-netes gives a clear explanation of how to install with Helm, but Pivotal Container Service (PKS) has 2 caveats since provisoned Kubernetes clusters are non-RBAC but are token backed and LoadBalancer inclusion with NSX-T. This is going to be a quick streamline of the documentation that adds out of the box support for PKS.

$ 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
$ kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
$ helm repo add openfaas https://openfaas.github.io/faas-netes/
$ helm repo update && helm upgrade openfaas --install openfaas/openfaas --namespace openfaas --set functionNamespace=openfaas-fn --set serviceType=LoadBalancer --set securityContext=false

Make sure everything is up and running

$ kubectl --namespace=openfaas get deployments -l "release=openfaas, app=openfaas"            
$ kubectl --namespace=openfaas get services               

For any issues view the troubleshooting docs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment