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
@@ -20,6 +20,13 @@ This page shows you how to set up a simple Ingress which routes requests to Serv
20
20
This tutorial assumes that you are using `minikube` to run a local Kubernetes cluster.
21
21
Visit [Install tools](/docs/tasks/tools/#minikube) to learn how to install `minikube`.
22
22
23
+
{{< note >}}
24
+
This tutorial uses a container that requires the AMD64 architecture.
25
+
If you are using minikube on a computer with a different CPU architecture,
26
+
you could try using minikube with a driver that can emulate AMD64.
27
+
For example, the Docker Desktop driver can do this.
28
+
{{< /note >}}
29
+
23
30
{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
24
31
If you are using an older Kubernetes version, switch to the documentation for that version.
25
32
@@ -70,6 +77,21 @@ If you haven't already set up a cluster locally, run `minikube start` to create
70
77
```none
71
78
deployment.apps/web created
72
79
```
80
+
81
+
Verify that the Deployment is in a Ready state:
82
+
83
+
```shell
84
+
kubectl get deployment web
85
+
```
86
+
87
+
The output should be similar to:
88
+
89
+
```none
90
+
NAME READY UP-TO-DATE AVAILABLE AGE
91
+
web 1/1 1 1 53s
92
+
```
93
+
94
+
73
95
74
96
1. Expose the Deployment:
75
97
@@ -96,22 +118,40 @@ If you haven't already set up a cluster locally, run `minikube start` to create
96
118
web NodePort 10.104.133.249 <none> 8080:31637/TCP 12m
97
119
```
98
120
99
-
1. Visit the Service via NodePort:
121
+
1. Visit the Service via NodePort, using the [`minikube service`](https://minikube.sigs.k8s.io/docs/handbook/accessing/#using-minikube-service-with-tunnel) command. Follow the instructions for your platform:
100
122
123
+
{{< tabs name="minikube_service" >}}
124
+
{{% tab name="Linux" %}}
125
+
101
126
```shell
102
127
minikube service web --url
103
128
```
104
-
105
129
The output is similar to:
106
-
107
130
```none
108
131
http://172.17.0.15:31637
109
132
```
110
-
133
+
Invoke the URL obtained in the output of the previous step:
111
134
```shell
112
135
curl http://172.17.0.15:31637
113
136
```
114
-
137
+
{{% /tab %}}
138
+
{{% tab name="MacOS" %}}
139
+
```shell
140
+
# The command must be run in a separate terminal.
141
+
minikube service web --url
142
+
```
143
+
The output is similar to:
144
+
```none
145
+
http://127.0.0.1:62445
146
+
! Because you are using a Docker driver on darwin, the terminal needs to be open to run it.
147
+
```
148
+
From a different terminal, invoke the URL obtained in the output of the previous step:
149
+
```shell
150
+
curl http://127.0.0.1:62445
151
+
```
152
+
{{% /tab %}}
153
+
{{< /tabs >}}
154
+
<br>
115
155
The output is similar to:
116
156
117
157
```none
@@ -162,12 +202,46 @@ The following manifest defines an Ingress that sends traffic to your Service via
162
202
```
163
203
164
204
165
-
1. Verify that the Ingress controller is directing traffic:
205
+
1. Verify that the Ingress controller is directing traffic, by following the instructions for your platform:
206
+
207
+
{{< note >}}
208
+
The network is limited if using the Docker driver on MacOS (Darwin) and the Node IP is not reachable directly. To get ingress to work you’ll need to open a new terminal and run `minikube tunnel`.
209
+
`sudo` permission is required for it, so provide the password when prompted.
210
+
{{< /note >}}
211
+
212
+
213
+
{{< tabs name="ingress" >}}
214
+
{{% tab name="Linux" %}}
166
215
167
216
```shell
168
217
curl --resolve "hello-world.info:80:$( minikube ip )" -i http://hello-world.info
169
218
```
219
+
{{% /tab %}}
220
+
{{% tab name="MacOS" %}}
221
+
222
+
```shell
223
+
minikube tunnel
224
+
```
225
+
The output is similar to:
226
+
227
+
```none
228
+
Tunnel successfully started
229
+
230
+
NOTE: Please do not close this terminal as this process must stay alive for the tunnel to be accessible ...
231
+
232
+
The service/ingress example-ingress requires privileged ports to be exposed: [80 443]
233
+
sudo permission will be asked for it.
234
+
Starting tunnel for service example-ingress.
235
+
```
170
236
237
+
From within a new terminal, invoke the following command:
0 commit comments