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
{{ message }}
This repository was archived by the owner on Dec 9, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: examples/todo-app/backend/README.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,31 +30,31 @@ Serverless: Function read-one successfully deployed
30
30
31
31
# Running the Backend in GKE
32
32
33
-
In case your cluster is running on GCE you need to perform an additional step. If you check the Ingress rules that has been created:
33
+
In case your cluster is running on GCE you need to perform some additional steps. First you need to follow the [guide for deploying an Ingress Controller](https://github.com/kubernetes/ingress-nginx/blob/master/docs/deploy/index.md). Make sure you execute the "Mandatory commands", the ones for "Install without RBAC roles" and also "GCE - GKE" (using RBAC). If you successfully follow the guide you should be able to see the Ingress Controller running in the `ingress-nginx` namespace:
There are two different possibilities, using `35.185.47.240.nip.io` or `35.196.212.24`. We will use the IP address (`35.196.212.24`) since it is accessible through HTTP. The hostname points to the Kubernetes API and it is only accessible through HTTPS and using the cluster certificate so it is not suitable for our application.
41
-
42
-
In any case we need to go to the [google console](https://console.cloud.google.com/) to enable HTTP traffic for the IP that we want to use.
43
-
44
-
On the left menu go to: `NETWORKING` -> `VPC Network` -> `Firewall rules` and select the Firewall rule that applies to all the Targets:
| Note: This will make the cluster accessible from anywhere to any port. You can create a more specific rule to only allow TCP traffic to the port 80
50
+
Note that the `HOST` is not correct since the IP that the Ingress provided us is different. To modify it execute `kubectl edit ingress todos`. That will open an editor in which you can change the key `host: 35.196.179.155.xip.io` for `host: 35.229.122.182.xip.io` or simply remove the key and the value to make it compatible with any host. Once you do that you should be able to access the functions:
53
51
54
-
You should now be able to access the functions:
55
-
```console
56
-
$ curl 35.196.212.24/read-all
52
+
```
53
+
$ kubectl get ingress
54
+
NAME HOSTS ADDRESS PORTS AGE
55
+
todos 35.229.122.182.xip.io 35.229.122.182 80 7m
56
+
$ curl 35.229.122.182.xip.io/read-all
57
57
[]
58
58
```
59
59
60
-
This IP is the one that should be used as `API_URL` in the frontend.
60
+
This host is the one that should be used as `API_URL` in the frontend.
0 commit comments