-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #12810 - Missing docs for ingress setup on minikube #12821
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,8 @@ weight: 100 | |
|
||
{{% capture overview %}} | ||
|
||
An [Ingress](/docs/concepts/services-networking/ingress/) is an API object that defines rules which allow external access | ||
to services in a cluster. An [Ingress controller](/docs/concepts/services-networking/ingress-controllers/) fulfills the rules set in the Ingress. | ||
An [Ingress](/docs/concepts/services-networking/ingress/) is an API object that defines rules which allow external access | ||
to services in a cluster. An [Ingress controller](#) fulfills the rules set in the Ingress. | ||
|
||
{{< caution >}} | ||
For the Ingress resource to work, the cluster **must** also have an Ingress controller running. | ||
|
@@ -44,7 +44,7 @@ This page shows you how to set up a simple Ingress which routes requests to Serv | |
```shell | ||
minikube addons enable ingress | ||
``` | ||
|
||
1. Verify that the NGINX Ingress controller is running | ||
|
||
```shell | ||
|
@@ -74,31 +74,31 @@ This page shows you how to set up a simple Ingress which routes requests to Serv | |
``` | ||
|
||
Output: | ||
|
||
```shell | ||
deployment.apps/web created | ||
``` | ||
|
||
1. Expose the Deployment: | ||
1. Expose the Deployment: | ||
|
||
```shell | ||
kubectl expose deployment web --target-port=8080 --type=NodePort | ||
``` | ||
Output: | ||
|
||
Output: | ||
|
||
```shell | ||
service/web exposed | ||
``` | ||
|
||
1. Verify the Service is created and is available on a node port: | ||
|
||
```shell | ||
kubectl get service web | ||
``` | ||
``` | ||
|
||
Output: | ||
|
||
```shell | ||
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE | ||
web NodePort 10.104.133.249 <none> 8080:31637/TCP 12m | ||
|
@@ -109,34 +109,33 @@ This page shows you how to set up a simple Ingress which routes requests to Serv | |
```shell | ||
minikube service web --url | ||
``` | ||
|
||
Output: | ||
|
||
```shell | ||
http://172.17.0.15:31637 | ||
``` | ||
|
||
{{< 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 >}} | ||
|
||
Output: | ||
|
||
```shell | ||
Hello, world! | ||
Version: 1.0.0 | ||
Hostname: web-55b8c6998d-8k564 | ||
``` | ||
|
||
You can now access the sample app via the Minikube IP address and NodePort. The next step lets you access | ||
the app using the Ingress resource. | ||
|
||
## Create an Ingress resource | ||
|
||
The following file is an Ingress resource that sends traffic to your Service via hello-world.info. | ||
The following file is an Ingress resource that sends traffic to your Service via ```hello-world.info```. | ||
|
||
1. Create `example-ingress.yaml` from the following file: | ||
|
||
```yaml | ||
--- | ||
```yaml | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
|
@@ -159,16 +158,16 @@ The following file is an Ingress resource that sends traffic to your Service via | |
```shell | ||
kubectl apply -f example-ingress.yaml | ||
``` | ||
|
||
Output: | ||
|
||
```shell | ||
ingress.extensions/example-ingress created | ||
``` | ||
|
||
1. Verify the IP address is set: | ||
1. Verify the IP address is set: | ||
|
||
```shell | ||
```shell | ||
kubectl get ingress | ||
``` | ||
|
||
|
@@ -179,13 +178,13 @@ The following file is an Ingress resource that sends traffic to your Service via | |
example-ingress hello-world.info 172.17.0.15 80 38s | ||
``` | ||
|
||
1. Add the following line to the bottom of the `/etc/hosts` file. | ||
1. Add the following line to the bottom of the `/etc/hosts` file. | ||
|
||
``` | ||
172.17.0.15 hello-world.info | ||
``` | ||
|
||
This sends requests from hello-world.info to Minikube. | ||
This sends requests from hello-world.info to Minikube. | ||
|
||
1. Verify that the Ingress controller is directing traffic: | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: line 195, correct spelling of controller |
||
|
@@ -211,41 +210,41 @@ The following file is an Ingress resource that sends traffic to your Service via | |
kubectl run web2 --image=gcr.io/google-samples/hello-app:2.0 --port=8080 | ||
``` | ||
Output: | ||
|
||
```shell | ||
deployment.apps/web2 created | ||
``` | ||
|
||
1. Expose the Deployment: | ||
|
||
```shell | ||
kubectl expose deployment web2 --target-port=8080 --type=NodePort | ||
``` | ||
|
||
Output: | ||
Output: | ||
|
||
```shell | ||
service/web2 exposed | ||
``` | ||
|
||
## Edit Ingress | ||
|
||
1. Edit the existing `example-ingress.yaml` and add the following lines: | ||
|
||
```yaml | ||
- path: /v2/* | ||
backend: | ||
serviceName: web2 | ||
servicePort: 8080 | ||
``` | ||
```yaml | ||
- path: /v2/* | ||
backend: | ||
serviceName: web2 | ||
servicePort: 8080 | ||
``` | ||
|
||
1. Apply the changes: | ||
|
||
```shell | ||
kubectl apply -f example-ingress.yaml | ||
``` | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: check item ordering (1, 2 vs 1, 1). May need to add/delete extra line. |
||
Output: | ||
Output: | ||
```shell | ||
ingress.extensions/example-ingress configured | ||
``` | ||
|
@@ -289,4 +288,3 @@ The following file is an Ingress resource that sends traffic to your Service via | |
* Read more about [Services](/docs/concepts/services-networking/service/) | ||
|
||
{{% /capture %}} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming that Ingress has left beta; we're long past v1.1. Is that right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be confirmed before it's updated in the document. Also, I don't think it is related to the current. We can open another bug to track it.