|
1 | 1 | # Kubernetes Instructions
|
2 | 2 |
|
| 3 | +## Table of Contents |
| 4 | + |
| 5 | +- [Prerequisites](#prerequisites) |
| 6 | +- [Getting Started](#getting-started) |
| 7 | +- [Load Testing](#load-testing) |
| 8 | +- [Exposing the Ingress Controller](#exposing-the-ingress-controller) |
| 9 | +- [Running the Minikube Service without Ingress](#running-the-minikube-service-without-ingress) |
| 10 | +- [GKE Instructions](#gke-instructions) |
| 11 | + |
3 | 12 | ## Prerequisites
|
4 | 13 |
|
5 | 14 | - [**Minikube**](https://minikube.sigs.k8s.io/docs/)
|
6 | 15 |
|
7 |
| - To run a local Kubernetes cluster, we |
8 |
| - recommend using Minikube on your local machine. |
| 16 | + To run a local Kubernetes cluster, we recommend using Minikube on your local machine. |
9 | 17 |
|
10 | 18 | ## Getting Started
|
11 | 19 |
|
12 |
| -1. Ensure that the Metrics Server add-on is enabled. Else, the autoscaling will not work. |
| 20 | +1. Ensure that the Metrics Server add-on is enabled. Else, the autoscaling and ingress will not work. |
13 | 21 |
|
14 | 22 | 2. For Minikube:
|
15 | 23 |
|
|
85 | 93 | kubectl apply -f ./k8s/ingress/06-nginx-ingress.yaml
|
86 | 94 | ```
|
87 | 95 |
|
| 96 | + It should take a couple of minutes. Once done, you should run this command: |
| 97 | + |
| 98 | + ```sh |
| 99 | + kubectl -n peerprep get ingress |
| 100 | +
|
| 101 | + # You should see a similar output: |
| 102 | + # NAME CLASS HOSTS ADDRESS PORTS AGE |
| 103 | + # peerprep-ingress nginx peerprep-g16.net 172.17.0.15 80 38s |
| 104 | + ``` |
| 105 | + |
88 | 106 | 3. Run the command to expose the ingress controller:
|
89 | 107 |
|
90 | 108 | ```sh
|
|
97 | 115 | 127.0.0.1 peerprep-g16.net
|
98 | 116 | ```
|
99 | 117 |
|
100 |
| -5. Visit `http://peerprep-g16.net` in your browser. |
| 118 | +5. If there is already an entry that points to `localhost`, comment it out temporarily. |
| 119 | + |
| 120 | + ```txt |
| 121 | + 127.0.0.1 localhost # <- Comment this out, it should look like this ↙️ |
| 122 | + |
| 123 | + # 127.0.0.1 localhost |
| 124 | + 127.0.0.1 peerprep-g16.net |
| 125 | + ``` |
| 126 | + |
| 127 | +6. Visit `http://peerprep-g16.net` in your browser. |
| 128 | + |
| 129 | +7. When done, reset your `/etc/hosts` file to its original state. |
| 130 | + |
| 131 | +8. Run <kbd>Ctrl</kbd>+<kbd>C</kbd> on the **Minikube Tunnel** to stop it. |
101 | 132 |
|
102 | 133 | ## Running the Minikube Service without Ingress
|
103 | 134 |
|
|
114 | 145 | ```
|
115 | 146 |
|
116 | 147 | A browser window should launch, directing you to the application's frontend.
|
| 148 | +
|
| 149 | +## GKE Instructions |
| 150 | +
|
| 151 | +To be added. |
| 152 | +
|
| 153 | +<!-- https://cert-manager.io/docs/tutorials/getting-started-with-cert-manager-on-google-kubernetes-engine-using-lets-encrypt-for-ingress-ssl/ --> |
0 commit comments