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
k3sup is a prototype of "faas-cli install" and makes the
experience much easier for newcomers. The longer, manual, and
more detailed instructions are retained in the documentation.
Advanced users are welcome to follow them.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
If you're running on a remote cluster run the following which will also expose a LoadBalancer with a public IP so that you can access it easily from your own laptop.
289
+
If you're using a local Kubernetes cluster or a VM, then run:
Depending on your installation method and Kubernetes distribution the Gateway URL may vary as will how you access it from your laptop during the workshop.
295
+
#### Or install with helm (advanced)
320
296
321
-
#### NodePort (local Kubernetes, excluding KinD)
297
+
If you prefer, you can install OpenFaaS using the [helm chart](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/README.md) instructions.
322
298
323
-
The default installation for OpenFaaS exposes the gateway through a Kubernetes Service of type `NodePort`. The gateway address will generally be: `http://IP_ADDRESS:31112/`
299
+
### Log into your OpenFaaS gateway
324
300
325
-
The default for Docker for Mac would be `http://127.0.0.1:31112`
326
-
327
-
#### LoadBalancer (remote Kubernetes, or KinD)
328
-
329
-
If you're using a remote cluster or KinD then you can either use a LoadBalancer or run a command to port-forward the gateway to your local computer over the internet.
330
-
331
-
* A) Get the LoadBalancer address
332
-
333
-
It may take a couple of minutes for the `EXTERNAL-IP` address to become available, it will remain `<pending>` during that time.
301
+
* Check the gateway is ready
334
302
335
303
```sh
336
-
kubectl get svc -o wide gateway-external -n openfaas
304
+
kubectl rollout status -n openfaas deploy/gateway
337
305
```
338
306
339
-
* B) Or start port-forwarding:
307
+
If you're using your laptop, a VM, or any other kind of Kubernetes distribution run the following instead:
Now set the `OPENFAAS_URL` variable to link to the proper IP:
346
-
```bash
347
-
export OPENFAAS_URL=http://IP_ADDRESS:8080
348
-
```
349
-
You should now have OpenFaaS deployed. If you are on a shared WiFi connection at an event then it may take several minutes to pull down all the Docker images and start them.
313
+
This command will open a tunnel from your Kubernetes cluster to your local computer so that you can access the OpenFaaS gateway. There are other ways to access OpenFaaS, but that is beyond the scope of this workshop.
350
314
351
-
Check the services show `1/1` on this screen:
315
+
Your gateway URL is: `http://127.0.0.1:8080`
352
316
353
-
```
354
-
$ kubectl get pods -n openfaas
355
-
NAME READY STATUS RESTARTS AGE
356
-
alertmanager-f5b4dfb8b-ztbb7 1/1 Running 0 1h
357
-
gateway-d8477b4b6-m962x 2/2 Running 0 1h
358
-
nats-86955fb749-8w65j 1/1 Running 0 1h
359
-
prometheus-7d78d54b57-nncss 1/1 Running 0 1h
360
-
queue-worker-8698f5bb78-qfv6n 1/1 Running 0 1h
361
-
```
362
-
363
-
If you run into any problems, please consult the [helm chart README](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/README.md).
317
+
If you're using a managed cloud Kubernetes service then get the LoadBalancer's IP address or DNS entry from the `EXTERNAL-IP` field from the command below.
364
318
365
-
### Login to the OpenFaaS Gateway
366
-
367
-
If you are running on a remote cluster and deployed openfaas with `basic_auth=true`, then you need to log in to access openfaas gateway.
319
+
```sh
320
+
kubectl get svc -o wide gateway-external -n openfaas
321
+
```
368
322
369
-
If you are accessing the gateway in the browser then it will prompt you for username and password. Username will be `admin` and password will be the value of environment variable `PASSWORD`
323
+
Your URL will be the IP or DNS entry above on port `8080`.
370
324
371
-
To access openfaas gateway from openfaas CLI, you need to log in using `faas-cli login` command.
0 commit comments