Creating a RESTful Service - Go

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”,
like AAPL,AMZN, GOOG, MSFT, etc.

Substitute the image reference path in the template with our published image
path. The command below substitutes using the \${REPO} variable into a new
file called docs/serving/samples/rest-api-go/sample.yaml.

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:

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.