Format markdown (#1379)

Produced via: `prettier --write --prose-wrap=always $(find -name '*.md' | grep -v vendor | grep -v .github)`
This commit is contained in:
mattmoor-sockpuppet 2019-05-29 07:28:34 -07:00 committed by Knative Prow Robot
parent dee2bd0751
commit ff9cac1293
1 changed files with 115 additions and 117 deletions

View File

@ -1,8 +1,7 @@
This "stock ticker" sample demonstrates how to create and run a simple RESTful service
on Knative Serving. The exposed endpoint outputs the stock price for a given
"[stock symbol](https://www.marketwatch.com/tools/quotes/lookup.asp)", like
`AAPL`,`AMZN`, `GOOG`, `MSFT`, etc.
This "stock ticker" sample demonstrates how to create and run a simple RESTful
service on Knative Serving. The exposed endpoint outputs the stock price for a
given "[stock symbol](https://www.marketwatch.com/tools/quotes/lookup.asp)",
like `AAPL`,`AMZN`, `GOOG`, `MSFT`, etc.
## Prerequisites
@ -155,12 +154,12 @@ You can inspect the created resources with the following `kubectl` commands:
## Access the Service
To access this service and run the stock ticker, you first obtain the ingress address
and service hostname, and then you run `curl` commands to send request with your stock
symbol.
To access this service and run the stock ticker, you first obtain the ingress
address and service hostname, and then you run `curl` commands to send request
with your stock symbol.
**Note**: This sample assumes that you are using Knative's default Ingress Gateway.
If you customized your gateway, you need to adjust the enviornment
**Note**: This sample assumes that you are using Knative's default Ingress
Gateway. If you customized your gateway, you need to adjust the enviornment
variables in the following steps.
1. Find the IP address of the ingress gateway:
@ -176,10 +175,10 @@ variables in the following steps.
echo $INGRESS_IP
```
- **Minikube**: If your cluster is running outside a cloud provider (for example on
Minikube), your services will never get an external IP address, and
`INGRESS_IP` won't contain a value. In that case, use the Istio `hostIP` and
`nodePort` as the ingress IP:
- **Minikube**: If your cluster is running outside a cloud provider (for
example on Minikube), your services will never get an external IP address,
and `INGRESS_IP` won't contain a value. In that case, use the Istio
`hostIP` and `nodePort` as the ingress IP:
```shell
export INGRESS_IP=$(kubectl get po --selector $INGRESSGATEWAY_LABEL=ingressgateway --namespace istio-system \
@ -202,8 +201,8 @@ variables in the following steps.
The `curl` command below makes a request to the Ingress Gateway IP. The
Ingress Gateway uses the host header to route the request to the Service.
This example passes the host header to skip DNS configuration. If your
cluster has DNS configured, you can simply curl the DNS name instead of the
ingress gateway IP.
cluster has DNS configured, you can simply curl the DNS name instead of
the ingress gateway IP.
```shell
curl --header "Host:$SERVICE_HOSTNAME" http://${INGRESS_IP}
@ -228,7 +227,6 @@ variables in the following steps.
where `<SYMBOL>` is your "stock symbol".
Response body: `stock price for ticker <SYMBOL> is <PRICE>`
**Example**