Deployment guide for OpenShift 3.11

OpenFaaS has been tested with OpenShift 3.11.

Deploy in a container

You can deploy OpenFaaS to OpenShift 3.11 in a container for development and testing.

Tutorial: Install OpenShift in a container with Weave Footloose by Alex Ellis

Deploy to on-premises OpenShift

See the tutorial above and start at the section Test your OpenShift cluster.

OpenFaaS deploys to two projects (also):

  • openfaas - core components
  • openfaas-fn - functions

On a production-grade OpenShift cluster you will need to join the two networks:

  1. oc adm pod-network join-projects --to=openfaas-fn openfaas

Once you have deployed OpenFaaS you can create a route to access your gateway and the UI.

  1. apiVersion: route.openshift.io/v1
  2. kind: Route
  3. metadata:
  4. name: openfaas
  5. namespace: openfaas
  6. spec:
  7. tls:
  8. termination: edge
  9. to:
  10. kind: Service
  11. name: gateway
  12. weight: 100
  13. wildcardPolicy: None

Customize your OpenFaaS configuration

The default configuration may not suit all purposes, so if you want to customize your configuration then you can use helm’s template command to generate customized YAML which can then be applied with oc or kubectl.

See also: template YAML files with helm.

Note: tiller (the server-side component of helm) is not required to generate YAML files

Test with Minishift

You can also test OpenFaaS with a minishift add-on by Mike Schendel