Skip to content

Commit 8288743

Browse files
author
Tim Bannister
committed
Update ingress tutorial for Katacoda EOL
1 parent 5ae11de commit 8288743

File tree

1 file changed

+30
-66
lines changed

1 file changed

+30
-66
lines changed

content/en/docs/tasks/access-application-cluster/ingress-minikube.md

Lines changed: 30 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,16 @@ This page shows you how to set up a simple Ingress which routes requests to Serv
1717

1818
## {{% heading "prerequisites" %}}
1919

20+
This tutorial assumes that you are using `minikube` to run a local Kubernetes cluster.
21+
Visit [Install tools](/docs/tasks/tools/#minikube) to learn how to install `minikube`.
22+
2023
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
2124
If you are using an older Kubernetes version, switch to the documentation for that version.
2225

23-
### Create a Minikube cluster
26+
### Create a minikube cluster
2427

25-
Using Katacoda
26-
: {{< kat-button >}}
28+
If you haven't already set up a cluster locally, run `minikube start` to create a cluster.
2729

28-
Locally
29-
: If you already [installed Minikube](/docs/tasks/tools/#minikube)
30-
locally, run `minikube start` to create a cluster.
3130

3231
<!-- steps -->
3332

@@ -41,10 +40,6 @@ Locally
4140

4241
1. Verify that the NGINX Ingress controller is running
4342

44-
45-
{{< tabs name="tab_with_md" >}}
46-
{{% tab name="minikube v1.19 or later" %}}
47-
4843
```shell
4944
kubectl get pods -n ingress-nginx
5045
```
@@ -61,35 +56,6 @@ Locally
6156
ingress-nginx-admission-patch-rqp78 0/1 Completed 1 11m
6257
ingress-nginx-controller-59b45fb494-26npt 1/1 Running 0 11m
6358
```
64-
{{% /tab %}}
65-
66-
{{% tab name="minikube v1.18.1 or earlier" %}}
67-
68-
```shell
69-
kubectl get pods -n kube-system
70-
```
71-
72-
{{< note >}}
73-
It can take up to a minute before you see these pods running OK.
74-
{{< /note >}}
75-
76-
The output is similar to:
77-
78-
```none
79-
NAME READY STATUS RESTARTS AGE
80-
default-http-backend-59868b7dd6-xb8tq 1/1 Running 0 1m
81-
kube-addon-manager-minikube 1/1 Running 0 3m
82-
kube-dns-6dcb57bcc8-n4xd4 3/3 Running 0 2m
83-
kubernetes-dashboard-5498ccf677-b8p5h 1/1 Running 0 2m
84-
nginx-ingress-controller-5984b97644-rnkrg 1/1 Running 0 1m
85-
storage-provisioner 1/1 Running 0 2m
86-
```
87-
88-
Make sure that you see a Pod with a name that starts with `nginx-ingress-controller-`.
89-
90-
{{% /tab %}}
91-
92-
{{< /tabs >}}
9359

9460
## Deploy a hello, world app
9561

@@ -142,12 +108,6 @@ Locally
142108
http://172.17.0.15:31637
143109
```
144110

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 >}}
150-
151111
The output is similar to:
152112

153113
```none
@@ -197,25 +157,11 @@ The following manifest defines an Ingress that sends traffic to your Service via
197157
example-ingress <none> hello-world.info 172.17.0.15 80 38s
198158
```
199159

200-
1. Add the following line to the bottom of the `/etc/hosts` file on
201-
your computer (you will need administrator access):
202-
203-
```none
204-
172.17.0.15 hello-world.info
205-
```
206-
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 >}}
211-
212-
After you make this change, your web browser sends requests for
213-
`hello-world.info` URLs to Minikube.
214160

215161
1. Verify that the Ingress controller is directing traffic:
216162

217163
```shell
218-
curl hello-world.info
164+
curl --resolve "hello-world.info:80:$( minikube ip )" -i http://hello-world.info
219165
```
220166

221167
You should see:
@@ -226,9 +172,27 @@ The following manifest defines an Ingress that sends traffic to your Service via
226172
Hostname: web-55b8c6998d-8k564
227173
```
228174

229-
{{< note >}}
230-
If you are running Minikube locally, you can visit `hello-world.info` from your browser.
231-
{{< /note >}}
175+
You can also visit `hello-world.info` from your browser.
176+
177+
* **Optionally**
178+
Look up the external IP address as reported by minikube:
179+
```shell
180+
minikube ip
181+
```
182+
183+
Add line similar to the following one to the bottom of the `/etc/hosts` file on
184+
your computer (you will need administrator access):
185+
186+
```none
187+
172.17.0.15 hello-world.info
188+
```
189+
190+
{{< note >}}
191+
Change the IP address to match the output from `minikube ip`.
192+
{{< /note >}}
193+
194+
After you make this change, your web browser sends requests for
195+
`hello-world.info` URLs to Minikube.
232196

233197
## Create a second Deployment
234198

@@ -288,7 +252,7 @@ The following manifest defines an Ingress that sends traffic to your Service via
288252
1. Access the 1st version of the Hello World app.
289253

290254
```shell
291-
curl hello-world.info
255+
curl --resolve "hello-world.info:80:$( minikube ip )" -i http://hello-world.info
292256
```
293257

294258
The output is similar to:
@@ -302,7 +266,7 @@ The following manifest defines an Ingress that sends traffic to your Service via
302266
1. Access the 2nd version of the Hello World app.
303267

304268
```shell
305-
curl hello-world.info/v2
269+
curl --resolve "hello-world.info:80:$( minikube ip )" -i http://hello-world.info/v2
306270
```
307271

308272
The output is similar to:
@@ -314,7 +278,7 @@ The following manifest defines an Ingress that sends traffic to your Service via
314278
```
315279

316280
{{< note >}}
317-
If you are running Minikube locally, you can visit `hello-world.info` and
281+
If you did the optional step to update `/etc/hosts`, you can also visit `hello-world.info` and
318282
`hello-world.info/v2` from your browser.
319283
{{< /note >}}
320284

0 commit comments

Comments
 (0)