Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 901 Bytes

04-gateway-config.md

File metadata and controls

41 lines (32 loc) · 901 Bytes

Configure OpenFaaS Gateway to receive external traffic

Create an Istio virtual service for OpenFaaS Gateway (replace example.com with your domain):

apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: gateway
  namespace: openfaas
spec:
  hosts:
  - "openfaas.example.com"
  gateways:
  - public-gateway.istio-system.svc.cluster.local
  http:
  - route:
    - destination:
        host: gateway
    timeout: 30s

Save the above resource as of-virtual-service.yaml and then apply it:

kubectl apply -f ./of-virtual-service.yaml

Wait for OpenFaaS Gateway to come online:

watch curl -v https://openfaas.example.com/healthz

Save your credentials in faas-cli store:

echo $password | faas-cli login -g https://openfaas.example.com -u admin --password-stdin

Next: Canary deployments for OpenFaaS functions