You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now decide how you want to expose the services and edit the `helm upgrade` command as required.
72
72
73
73
* To use NodePorts/ClusterIP - (the default and best for development, with port-forwarding)
74
-
* To use an IngressController add `--set ingress.enabled=true` (recommended for production, for use with TLS)
74
+
* To use an IngressController add `--set ingress.enabled=true` (recommended for production, for use with TLS) - [follow the full guide](https://docs.openfaas.com/reference/tls-openfaas/)
75
75
* To use a LoadBalancer add `--set serviceType=LoadBalancer` (not recommended, since it will expose plain HTTP)
If you would like to work with Function CRDs there is an alternative controller to faas-netes named [OpenFaaS Operator](https://github.com/openfaas-incubator/openfaas-operator) which can be swapped in at deployment time.
276
-
The OpenFaaS Operator is suitable for development and testing and may replace the faas-netes controller in the future.
277
-
The Operator is compatible with Kubernetes 1.9 or later.
275
+
OpenFaaS CE uses the old "controller" mode of OpenFaaS, where Kubernetes objects are directly modified by the HTTP API call. If the HTTP call fails, the objects may not be updated or create successfully.
278
276
279
-
To use it, add the flag: `--set operator.create=true`when installing with Helm.
277
+
OpenFaaS Pro uses a more idiomatic Kubernetes integration through the use of [CustomResourceDefinitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). The operator pattern used with the CRD means that you can interact with a "Function" Custom Resource along with the HTTP REST API.
280
278
281
-
### faas-netes vs OpenFaaS Operator
279
+
The HTTP REST endpoints all interact with the Function CRD, then the operator watches for changes and updates the Kubernetes objects accordingly, retrying, backing off, and reporting the progress via the .Status field.
282
280
283
-
The faas-netes controller is the most tested, stable and supported version of the OpenFaaS integration with Kubernetes. In contrast the OpenFaaS Operator is based upon the codebase and features from `faas-netes`, but offers a tighter integration with Kubernetes through [CustomResourceDefinitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/). This means you can type in `kubectl get functions` for instance.
281
+
Some long-time OpenFaaS Pro users still use the controller mode, for backwards compatibility. It should be considered deprecated and will be removed in the future. No no users should adopt it for this reason.
284
282
285
-
See also: [Introducing the OpenFaaS Operator](https://www.openfaas.com/blog/kubernetes-operator-crd/)
283
+
See also: [How and why you should upgrade to the Function Custom Resource Definition (CRD)](https://www.openfaas.com/blog/upgrade-to-the-function-crd/)
286
284
287
285
## Deployment with `helm template`
288
286
@@ -316,33 +314,31 @@ Now [verify your installation](#verify-the-installation).
316
314
317
315
## Exposing services
318
316
319
-
### NodePorts
320
317
321
-
By default a NodePort will be created for the API Gateway.
318
+
### Deploy with an IngressController
322
319
323
-
### Metrics
320
+
Use the following guide to setup TLS for the [Gateway and Dashboard](https://docs.openfaas.com/reference/tls-openfaas/).
324
321
325
-
You temporarily access the Prometheus metrics by using `port-forward`
322
+
If you are using Ingress locally, for testing, then you can access the gateway by adding:
Then open `http://localhost:31119` to directly query the OpenFaaS metrics scraped by Prometheus.
332
-
333
-
### LB
329
+
Update the fields for the `ingress` section of values.yaml
334
330
335
-
If you're running on a cloud such as AKS or GKE you will need to pass an additional flag of `--set serviceType=LoadBalancer` to tell `helm` to create LoadBalancer objects instead. An alternative to using multiple LoadBalancers is to install an Ingress controller.
331
+
By default, the name `gateway.openfaas.local` will be used with HTTP access only, without TLS.
336
332
337
-
### Deploy with an IngressController
333
+
### NodePorts
338
334
339
-
In order to make use of automatic ingress settings you will need an IngressController in your cluster such as Traefik or Nginx.
335
+
By default a NodePort will be created for the OpenFaaS Gateway on port 31112, you can prevent this by setting `exposeServices` to `false`, or `serviceType` to `ClusterIP`.
340
336
341
-
Add `--set ingress.enabled` to enable ingress pass `--set ingress.enabled=true` when running the installation via `helm`.
337
+
### LoadBalancer (not recommended)
342
338
343
-
By default services will be exposed with following hostnames (can be changed, see values.yaml for details):
339
+
There is no reason to use a LoadBalancer for OpenFaaS, because it will expose the gateway using plain-text HTTP, and you will have no encryption.
344
340
345
-
* `gateway.openfaas.local`
341
+
This flag is controlled by `--set serviceType=LoadBalancer`, which creates a new gateway service of type LoadBalancer.
346
342
347
343
### Endpoint load-balancing
348
344
@@ -358,11 +354,20 @@ Some configurations in combination with client-side KeepAlive settings may becau
358
354
359
355
In this mode, all invocations will pass through the gateway to faas-netes, which will look up endpoint IPs directly from Kubernetes, the additional hop may add some latency, but will do fair load-balancing, even with KeepAlive.
360
356
361
-
### SSL / TLS
362
357
363
-
If you require TLS/SSL then please make use of an IngressController. A full guide is provided to [enable TLS for the OpenFaaS Gateway using cert-manager and Let's Encrypt](https://docs.openfaas.com/reference/ssl/kubernetes-with-cert-manager/).
358
+
### Metrics
359
+
360
+
You temporarily access the Prometheus metrics by using `port-forward`
0 commit comments