Skip to content

Commit

Permalink
Reference glossary definitions in “Connect a Front End to a Back End …
Browse files Browse the repository at this point in the history
…Using a Service” (kubernetes#12706)

* Reference terms in glossary

* Enable syntax highlighting for shell snippets
  • Loading branch information
sftim authored and yagonobre committed Mar 14, 2019
1 parent 97ff27d commit 7c0b2b2
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ weight: 70

This task shows how to create a frontend and a backend
microservice. The backend microservice is a hello greeter. The
frontend and backend are connected using a Kubernetes Service object.
frontend and backend are connected using a Kubernetes
{{< glossary_tooltip term_id="service" >}} object.

{{% /capture %}}


{{% capture objectives %}}

* Create and run a microservice using a Deployment object.
* Create and run a microservice using a {{< glossary_tooltip term_id="deployment" >}} object.
* Route traffic to the backend using a frontend.
* Use a Service object to connect the frontend application to the
backend application.
Expand Down Expand Up @@ -47,13 +48,13 @@ file for the backend Deployment:

Create the backend Deployment:

```
```shell
kubectl create -f https://k8s.io/examples/service/access/hello.yaml
```

View information about the backend Deployment:

```
```shell
kubectl describe deployment hello
```

Expand Down Expand Up @@ -99,7 +100,8 @@ Events:
The key to connecting a frontend to a backend is the backend
Service. A Service creates a persistent IP address and DNS name entry
so that the backend microservice can always be reached. A Service uses
selector labels to find the Pods that it routes traffic to.
{{< glossary_tooltip text="selectors" term_id="selector" >}} to find
the Pods that it routes traffic to.

First, explore the Service configuration file:

Expand All @@ -110,7 +112,7 @@ that have the labels `app: hello` and `tier: backend`.

Create the `hello` Service:

```
```shell
kubectl create -f https://k8s.io/examples/service/access/hello-service.yaml
```

Expand All @@ -137,7 +139,7 @@ the Service uses the default load balancer of your cloud provider.

Create the frontend Deployment and Service:

```
```shell
kubectl create -f https://k8s.io/examples/service/access/frontend.yaml
```

Expand All @@ -161,7 +163,7 @@ so that you can change the configuration more easily.
Once you’ve created a Service of type LoadBalancer, you can use this
command to find the external IP:

```
```shell
kubectl get service frontend --watch
```

Expand Down Expand Up @@ -189,8 +191,8 @@ cluster.
The frontend and backends are now connected. You can hit the endpoint
by using the curl command on the external IP of your frontend Service.

```
curl http://<EXTERNAL-IP>
```shell
curl http://${EXTERNAL_IP} # replace this with the EXTERNAL-IP you saw earlier
```

The output shows the message generated by the backend:
Expand Down

0 comments on commit 7c0b2b2

Please sign in to comment.