diff --git a/content/en/docs/concepts/services-networking/ingress.md b/content/en/docs/concepts/services-networking/ingress.md index 64b094ff21a7a..e24b1df56daeb 100644 --- a/content/en/docs/concepts/services-networking/ingress.md +++ b/content/en/docs/concepts/services-networking/ingress.md @@ -45,7 +45,7 @@ uses a service of type [Service.Type=NodePort](/docs/concepts/services-networkin {{< feature-state for_k8s_version="v1.1" state="beta" >}} -Before you start using an Ingress, there are a few things you should understand. The Ingress is a beta resource. +Before you start using an Ingress, there are a few things you should understand. The Ingress is a beta resource. {{< note >}} You must have an [Ingress controller](/docs/concepts/services-networking/ingress-controllers) to satisfy an Ingress. Only creating an Ingress resource has no effect. @@ -56,7 +56,7 @@ GCE/Google Kubernetes Engine deploys an Ingress controller on the master. Review of this controller if you are using GCE/GKE. In environments other than GCE/Google Kubernetes Engine, you may need to -[deploy an ingress controller](https://kubernetes.github.io/ingress-nginx/deploy/). There are a number of +[deploy an ingress controller](https://kubernetes.github.io/ingress-nginx/deploy/). There are a number of [ingress controllers](/docs/concepts/services-networking/ingress-controllers) you may choose from. ### Before you begin @@ -261,7 +261,7 @@ spec: If you create an Ingress resource without any hosts defined in the rules, then any web traffic to the IP address of your Ingress controller can be matched without a name based -virtual host being required. For example, the following Ingress resource will route traffic +virtual host being required. For example, the following Ingress resource will route traffic requested for `first.bar.com` to `service1`, `second.foo.com` to `service2`, and any traffic to the IP address without a hostname defined in request (that is, without a request header being presented) to `service3`. @@ -317,7 +317,7 @@ type: kubernetes.io/tls Referencing this secret in an Ingress will tell the Ingress controller to secure the channel from the client to the loadbalancer using TLS. You need to make -sure the TLS secret you created came from a certificate that contains a CN +sure the TLS secret you created came from a certificate that contains a CN for `sslexample.foo.com`. ```yaml diff --git a/content/en/docs/tasks/access-application-cluster/ingress-minikube.md b/content/en/docs/tasks/access-application-cluster/ingress-minikube.md index a810603f19aa2..d72c35a2e4ea8 100644 --- a/content/en/docs/tasks/access-application-cluster/ingress-minikube.md +++ b/content/en/docs/tasks/access-application-cluster/ingress-minikube.md @@ -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 8080:31637/TCP 12m @@ -109,9 +109,9 @@ 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 ``` @@ -119,24 +119,23 @@ This page shows you how to set up a simple Ingress which routes requests to Serv {{< 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: @@ -211,33 +210,33 @@ 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: @@ -245,7 +244,7 @@ The following file is an Ingress resource that sends traffic to your Service via kubectl apply -f example-ingress.yaml ``` - 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 %}} -