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
{{< note >}}Katacoda environment only: at the top of the terminal panel, click the plus sign, and then click **Select port to view on Host 1**. Enter the NodePort, in this case `31637`, and then click **Display Port**.{{< /note >}}
145
+
{{< note >}}
146
+
Katacoda environment only: at the top of the terminal panel, click the plus sign,
147
+
and then click **Select port to view on Host 1**. Enter the NodePort value,
148
+
in this case `31637`, and then click **Display Port**.
149
+
{{< /note >}}
137
150
138
151
The output is similar to:
139
152
140
-
```
153
+
```none
141
154
Hello, world!
142
155
Version: 1.0.0
143
156
Hostname: web-55b8c6998d-8k564
144
157
```
145
158
146
-
You can now access the sample app via the Minikube IP address and NodePort. The next step lets you access
147
-
the app using the Ingress resource.
159
+
You can now access the sample application via the Minikube IP address and NodePort.
160
+
The next step lets you access the application using the Ingress resource.
148
161
149
162
## Create an Ingress
150
163
151
-
The following manifest defines an Ingress that sends traffic to your Service via hello-world.info.
164
+
The following manifest defines an Ingress that sends traffic to your Service via
165
+
`hello-world.info`.
152
166
153
167
1. Create `example-ingress.yaml` from the following file:
154
168
@@ -162,7 +176,7 @@ The following manifest defines an Ingress that sends traffic to your Service via
162
176
163
177
The output should be:
164
178
165
-
```
179
+
```none
166
180
ingress.networking.k8s.io/example-ingress created
167
181
```
168
182
@@ -172,42 +186,49 @@ The following manifest defines an Ingress that sends traffic to your Service via
172
186
kubectl get ingress
173
187
```
174
188
175
-
{{< note >}}This can take a couple of minutes.{{< /note >}}
189
+
{{< note >}}
190
+
This can take a couple of minutes.
191
+
{{< /note >}}
176
192
177
-
You should see an IPv4 address in the ADDRESS column; for example:
193
+
You should see an IPv4 address in the `ADDRESS` column; for example:
1. Add the following line to the bottom of the `/etc/hosts` file on
185
201
your computer (you will need administrator access):
186
202
187
-
```
203
+
```none
188
204
172.17.0.15 hello-world.info
189
205
```
190
206
191
-
{{< note >}}If you are running Minikube locally, use `minikube ip` to get the external IP. The IP address displayed within the ingress list will be the internal IP.{{< /note >}}
207
+
{{< note >}}
208
+
If you are running Minikube locally, use `minikube ip` to get the external IP.
209
+
The IP address displayed within the ingress list will be the internal IP.
210
+
{{< /note >}}
192
211
193
-
After you make this change, your web browser sends requests for
194
-
hello-world.info URLs to Minikube.
212
+
After you make this change, your web browser sends requests for
213
+
`hello-world.info` URLs to Minikube.
195
214
196
215
1. Verify that the Ingress controller is directing traffic:
197
216
198
-
```shell
199
-
curl hello-world.info
200
-
```
217
+
```shell
218
+
curl hello-world.info
219
+
```
201
220
202
-
You should see:
221
+
You should see:
203
222
204
-
```
205
-
Hello, world!
206
-
Version: 1.0.0
207
-
Hostname: web-55b8c6998d-8k564
208
-
```
223
+
```none
224
+
Hello, world!
225
+
Version: 1.0.0
226
+
Hostname: web-55b8c6998d-8k564
227
+
```
209
228
210
-
{{< note >}}If you are running Minikube locally, you can visit hello-world.info from your browser.{{< /note >}}
229
+
{{< note >}}
230
+
If you are running Minikube locally, you can visit `hello-world.info` from your browser.
231
+
{{< /note >}}
211
232
212
233
## Create a second Deployment
213
234
@@ -216,9 +237,10 @@ The following manifest defines an Ingress that sends traffic to your Service via
0 commit comments