File tree 3 files changed +20
-4
lines changed 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 1
1
#! /bin/bash
2
2
3
+ # Create namespace
4
+
5
+ kubectl create namespace echo-demo
3
6
# Create deployment
4
- kubectl create deployment echo -n default --image=carlosedp/echo-riscv
7
+ kubectl create deployment echo -n echo-demo --image=carlosedp/echo-riscv
5
8
6
9
# Expose service inside the cluster
7
- kubectl expose deploy echo -n default --type=NodePort --port=80 --target-port=8080
10
+ kubectl expose deploy echo -n echo-demo --type=NodePort --port=80 --target-port=8080
8
11
9
12
# Create an ingress
10
13
cat << EOF | kubectl apply -f -
11
14
apiVersion: extensions/v1beta1
12
15
kind: Ingress
13
16
metadata:
14
17
name: echo
15
- namespace: default
18
+ namespace: echo-demo
16
19
spec:
17
20
rules:
18
- - host: echo.192.168.15.16 .nip.io
21
+ - host: echo.192.168.1.17 .nip.io
19
22
http:
20
23
paths:
21
24
- path: /
File renamed without changes.
Original file line number Diff line number Diff line change @@ -47,3 +47,16 @@ faas-cli list
47
47
Function Invocations Replicas
48
48
```
49
49
50
+ ### 4.0 Deploy and test a function
51
+
52
+ ``` sh
53
+ faas-cli deploy --image carlosedp/faas-figlet:riscv64 --name figlet-riscv
54
+ echo " Hello World! I'm running OpenFaaS on Kubernetes in RISC-V" | faas-cli invoke figlet-riscv
55
+ ```
56
+
57
+ Remove if desired:
58
+
59
+ ``` sh
60
+ faas-cli remove figlet-riscv
61
+ ```
62
+
You can’t perform that action at this time.
0 commit comments