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
The plain YAML will remain in the repo, but complicates
instructions for beginners.
The store and initial function instructions are covered
elsewhere in the docs and in the workshop.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
Copy file name to clipboardExpand all lines: docs/deployment/kubernetes.md
+7-129Lines changed: 7 additions & 129 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ Before deploying OpenFaaS, you should provision a Kubernetes cluster. There are
19
19
Once you have a cluster, you can follow the detailed instructions on this page.
20
20
21
21
* Install OpenFaaS CLI
22
-
* Deploy OpenFaaS from static YAML, via helm, or via new YAML files generated with `helm template`
22
+
* Deploy OpenFaaS using via helm or arkade
23
23
* Find your OpenFaaS gateway address
24
24
* Log in, deploy a function, and try out the UI.
25
25
@@ -85,19 +85,17 @@ The CLI is also available on `brew` for MacOS users, however it may lag behind b
85
85
brew install faas-cli
86
86
```
87
87
88
-
### Pick `arkade`, `helm` or plain YAML files
88
+
### Install the OpenFaaS chart using `arkade` or `helm`
89
89
90
90
There are three recommended ways to install OpenFaaS and you can pick whatever makes sense for you and your team.
91
91
92
-
*`arkade install` - arkade installs OpenFaaS to Kubernetes using its official helm chart and is the easiest and quickest way to get up and running.
93
-
94
-
* Helm chart - sane defaults and easy to configure through YAML or CLI flags. Secure options such as `helm template` or `helm 3` also exist for those working within restrictive environments.
95
-
96
-
* Plain YAML files - not recommended for anything beyond testing since the options are generated and hard-coded. Tools like Kustomize can offer the ability to custom the files.
92
+
1) Helm with `arkade install` - arkade installs OpenFaaS to Kubernetes using its official helm chart and is the easiest and quickest way to get up and running.
93
+
2)`helm` client - sane defaults and easy to configure through YAML or CLI flags. Secure options such as `helm template` or `helm 3` also exist for those working within restrictive environments.
94
+
3) With GitOps tooling. You can install OpenFaaS and keep it up to date with [Flux](https://github.com/fluxcd/flux) or [ArgoCD](https://argoproj.github.io/argo-cd/).
97
95
98
96
Guidelines are also provided for [preparing for production](/architecture/production/) and for [performance testing](/architecture/performance).
99
97
100
-
#### A. Deploy with `arkade` (fastest option)
98
+
#### 1) Deploy the Chart with `arkade` (fastest option)
101
99
102
100
The `arkade install` command installs OpenFaaS using its official helm chart, but without using `tiller`, a [component which is insecure by default](https://engineering.bitnami.com/articles/running-helm-in-production.html). arkade can also install other important software for OpenFaaS users such as `cert-manager` and `nginx-ingress`. It's the easiest and quickest way to get up and running.
103
101
@@ -135,7 +133,7 @@ Other options for installation are available with `arkade install openfaas --hel
135
133
136
134
For cloud users run `kubectl get -n openfaas svc/gateway-external` and look for `EXTERNAL-IP`. This is your gateway address.
137
135
138
-
#### B. Deploy with Helm (for production, most configurable)
136
+
#### 2) Deploy the Chart with `helm`
139
137
140
138
A Helm chart is provided in the `faas-netes` repository. Follow the link below then come back to this page.
141
139
@@ -146,63 +144,6 @@ A Helm chart is provided in the `faas-netes` repository. Follow the link below t
146
144
147
145
See the [Chart readme](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/README.md#deployment-with-helm-template) for how to generate your own static YAML files using `helm template`.
148
146
149
-
#### C. Deploy using `kubectl` and plain YAML (for development-only)
150
-
151
-
You can run these commands on your computer if you have `kubectl` and `KUBECONFIG` file available.
For deploying on a cloud that supports Kubernetes *LoadBalancers* you may also want to apply the configuration in: `cloud/lb.yml`.
205
-
206
147
#### Notes for Raspberry Pi & 32-bit ARM (armhf)
207
148
208
149
Use `arkade` to install OpenFaaS, it will determine the correct files to use to install OpenFaaS.
@@ -258,69 +199,6 @@ You can also find a list of [community tutorials, events, and videos](https://gi
258
199
259
200
A walk-through video shows auto-scaling in action and the Prometheus UI: [walk-through video](https://www.youtube.com/watch?v=0DbrLsUvaso).
260
201
261
-
### Deploy a function
262
-
263
-
Functions can be deployed using the REST API, UI, CLI, or Function Store. Continue below to deploy your first sample function.
264
-
265
-
#### Deploy functions from the OpenFaaS Function Store
266
-
267
-
You can find many different sample functions from the community through the OpenFaaS Function Store. The Function Store is built into the UI portal and also available via the CLI.
268
-
269
-
You may need to pass the `--gateway` / `-g` flag to each `faas-cli`command or alternatively you can set an environmental variable such as:
270
-
271
-
```bash
272
-
export OPENFAAS_URL=http://127.0.0.1:31112
273
-
```
274
-
275
-
To search the store:
276
-
277
-
```bash
278
-
$ faas-cli store list
279
-
```
280
-
281
-
To deploy `figlet`:
282
-
283
-
```bash
284
-
$ faas-cli store deploy figlet
285
-
```
286
-
287
-
Now find the functiondeployedin the cluster and invoke it.
288
-
289
-
```bash
290
-
$ faas-cli list
291
-
$ echo"OpenFaaS!"| faas-cli invoke figlet
292
-
```
293
-
294
-
You can also access the Function Store from the Portal UI and find a range of functions covering everything from machine-learning to network tools.
295
-
296
-
##### Build your first Python function
297
-
298
-
[Your first serverless Python functionwith OpenFaaS](https://blog.alexellis.io/first-faas-python-function/)
299
-
300
-
#### Use the UI
301
-
302
-
Access your gateway using the URL from the steps above.
303
-
304
-
Click "New Function" and fill it out with the following:
305
-
306
-
| Field | Value |
307
-
-------------|------------------------------|
308
-
| Service | nodeinfo |
309
-
| Image | functions/nodeinfo:latest |
310
-
| fProcess | node main.js |
311
-
| Network | default |
312
-
313
-
* Test the function
314
-
315
-
Your functionwill appear after a few seconds and you can click "Invoke"
0 commit comments