Skip to content

Commit 605e7d5

Browse files
committed
Remove instructions for plain YAML and store
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]>
1 parent 1e4f99b commit 605e7d5

File tree

1 file changed

+7
-129
lines changed

1 file changed

+7
-129
lines changed

docs/deployment/kubernetes.md

Lines changed: 7 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Before deploying OpenFaaS, you should provision a Kubernetes cluster. There are
1919
Once you have a cluster, you can follow the detailed instructions on this page.
2020

2121
* 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
2323
* Find your OpenFaaS gateway address
2424
* Log in, deploy a function, and try out the UI.
2525

@@ -85,19 +85,17 @@ The CLI is also available on `brew` for MacOS users, however it may lag behind b
8585
brew install faas-cli
8686
```
8787

88-
### Pick `arkade`, `helm` or plain YAML files
88+
### Install the OpenFaaS chart using `arkade` or `helm`
8989

9090
There are three recommended ways to install OpenFaaS and you can pick whatever makes sense for you and your team.
9191

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/).
9795

9896
Guidelines are also provided for [preparing for production](/architecture/production/) and for [performance testing](/architecture/performance).
9997

100-
#### A. Deploy with `arkade` (fastest option)
98+
#### 1) Deploy the Chart with `arkade` (fastest option)
10199

102100
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.
103101

@@ -135,7 +133,7 @@ Other options for installation are available with `arkade install openfaas --hel
135133

136134
For cloud users run `kubectl get -n openfaas svc/gateway-external` and look for `EXTERNAL-IP`. This is your gateway address.
137135

138-
#### B. Deploy with Helm (for production, most configurable)
136+
#### 2) Deploy the Chart with `helm`
139137

140138
A Helm chart is provided in the `faas-netes` repository. Follow the link below then come back to this page.
141139

@@ -146,63 +144,6 @@ A Helm chart is provided in the `faas-netes` repository. Follow the link below t
146144

147145
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`.
148146

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.
152-
153-
* Clone the repository
154-
155-
```bash
156-
$ git clone https://github.com/openfaas/faas-netes
157-
```
158-
159-
* Deploy the whole stack
160-
161-
This command is split into two parts so that the OpenFaaS namespaces are always created first:
162-
163-
* `openfaas` - for OpenFaaS services
164-
* `openfaas-fn` - for functions
165-
166-
```bash
167-
$ kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
168-
```
169-
170-
Create a password for the gateway:
171-
172-
```bash
173-
# generate a random password
174-
PASSWORD=$(head -c 12 /dev/urandom | shasum| cut -d' ' -f1)
175-
176-
kubectl -n openfaas create secret generic basic-auth \
177-
--from-literal=basic-auth-user=admin \
178-
--from-literal=basic-auth-password="$PASSWORD"
179-
```
180-
181-
Now deploy OpenFaaS:
182-
183-
```bash
184-
$ cd faas-netes && \
185-
kubectl apply -f ./yaml
186-
```
187-
188-
Set your `OPENFAAS_URL`, if using a NodePort this may be `127.0.0.1:31112`.
189-
190-
If you're using a remote cluster, or you're not sure then you can also port-forward the gateway to your machine for this step.
191-
192-
```bash
193-
kubectl port-forward svc/gateway -n openfaas 31112:8080 &
194-
```
195-
196-
Now log in:
197-
```bash
198-
export OPENFAAS_URL=http://127.0.0.1:31112
199-
200-
echo -n $PASSWORD | faas-cli login --password-stdin
201-
```
202-
203-
!!! note
204-
For deploying on a cloud that supports Kubernetes *LoadBalancers* you may also want to apply the configuration in: `cloud/lb.yml`.
205-
206147
#### Notes for Raspberry Pi & 32-bit ARM (armhf)
207148

208149
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
258199

259200
A walk-through video shows auto-scaling in action and the Prometheus UI: [walk-through video](https://www.youtube.com/watch?v=0DbrLsUvaso).
260201

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 function deployed in 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 function with 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 function will appear after a few seconds and you can click "Invoke"
316-
317-
The function can also be invoked through the CLI:
318-
319-
```bash
320-
$ echo -n "" | faas-cli invoke --gateway http://kubernetes-ip:31112 nodeinfo
321-
$ echo -n "verbose" | faas-cli invoke --gateway http://kubernetes-ip:31112 nodeinfo
322-
```
323-
324202
### Troubleshooting
325203

326204
If you are running into any issues please check out the troubleshooting guide and search the documentation / past issues before raising an issue.

0 commit comments

Comments
 (0)