Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions serving/samples/autoscale/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ kubectl apply -f sample/autoscale/sample.yaml

```

Export your Ingress IP as SERVICE_IP.
Export your ingress IP as SERVICE_IP.

```shell
# Put the Ingress Host name into an environment variable.
# Put the ingress Host name into an environment variable.
export SERVICE_HOST=`kubectl get route autoscale-route -o jsonpath="{.status.domain}"`

# Put the Ingress IP into an environment variable.
export SERVICE_IP=`kubectl get ingress autoscale-route-ingress -o jsonpath="{.status.loadBalancer.ingress[*]['ip']}"`
# Put the ingress IP into an environment variable.
export SERVICE_IP=`kubectl get svc knative-ingressgateway -n istio-system -o jsonpath="{.status.loadBalancer.ingress[*].ip}"`
```

Request the largest prime less than 40,000,000 from the autoscale app. Note that it consumes about 1 cpu/sec.
Expand Down
14 changes: 7 additions & 7 deletions serving/samples/buildpack-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@ Once the `BuildComplete` status becomes `True` the resources will start getting

To access this service via `curl`, we first need to determine its ingress address:
```shell
$ watch kubectl get ing
NAME HOSTS ADDRESS PORTS AGE
buildpack-sample-app-ingress buildpack-app.example.com 80 3m
$ watch kubectl get svc knative-ingressgateway -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
```

Once the `ADDRESS` gets assigned to the cluster, you can run:

```shell
# Put the Ingress Host name into an environment variable.
# Put the Host name into an environment variable.
export SERVICE_HOST=`kubectl get route buildpack-sample-app -o jsonpath="{.status.domain}"`

# Put the Ingress IP into an environment variable.
$ export SERVICE_IP=`kubectl get ingress buildpack-sample-app-ingress -o jsonpath="{.status.loadBalancer.ingress[*]['ip']}"`
# Put the ingress IP into an environment variable.
export SERVICE_IP=`kubectl get svc knative-ingressgateway -n istio-system -o jsonpath="{.status.loadBalancer.ingress[*].ip}"`

# Curl the Ingress IP "as-if" DNS were properly configured.
# Curl the ingress IP "as-if" DNS were properly configured.
$ curl --header "Host: $SERVICE_HOST" http://${SERVICE_IP}/
[response]
```
Expand Down
17 changes: 9 additions & 8 deletions serving/samples/buildpack-function/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,22 @@ Once the `BuildComplete` status becomes `True` the resources will start getting

To access this service via `curl`, we first need to determine its ingress address:
```shell
$ watch kubectl get ing
NAME HOSTS ADDRESS PORTS AGE
buildpack-function-ingress buildpack-function.default.example.com 0.0.0.0 80 3m
watch kubectl get svc knative-ingressgateway -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
```

Once the `ADDRESS` gets assigned to the cluster, you can run:
Once the `EXTERNAL-IP` gets assigned to the cluster, you can run:

```shell
# Put the Ingress Host name into an environment variable.
# Put the Host name into an environment variable.
$ export SERVICE_HOST=`kubectl get route buildpack-function -o jsonpath="{.status.domain}"`

# Put the Ingress IP into an environment variable.
$ export SERVICE_IP=`kubectl get ingress buildpack-function-ingress -o jsonpath="{.status.loadBalancer.ingress[*]['ip']}"`
# Put the ingress IP into an environment variable.
$ export SERVICE_IP=`kubectl get svc knative-ingressgateway -n istio-system -o jsonpath="{.status.loadBalancer.ingress[*].ip}"`

# Curl the Ingress IP "as-if" DNS were properly configured.

# Curl the ingress IP "as-if" DNS were properly configured.
$ curl http://${SERVICE_IP}/ -H "Host: $SERVICE_HOST" -H "Content-Type: application/json" -d "33"
[response]
```
Expand Down
10 changes: 5 additions & 5 deletions serving/samples/gitwebhook/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ kubectl get revisions -o yaml
```

To make this service accessible to github, we first need to determine its ingress address
(might have to wait a little while until 'ADDRESS' gets assigned):
(might have to wait a little while until `EXTERNAL-IP` gets assigned):
```shell
$ watch kubectl get ingress
NAME HOSTS ADDRESS PORTS AGE
git-webhook-ingress demostuff.aikas.org 35.202.30.59 80 14s
watch kubectl get svc knative-ingressgateway -n istio-system
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
```

Once the `ADDRESS` gets assigned to the cluster, you need to assign a DNS name for that IP address.
Once the `EXTERNAL-IP` gets assigned to the cluster, you need to assign a DNS name for that IP address.
[Using GCP DNS](https://support.google.com/domains/answer/3290350)

So, you'd need to create an A record for demostuff.aikas.org pointing to 35.202.30.59.
Expand Down
6 changes: 3 additions & 3 deletions serving/samples/grpc-ping/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ kubectl apply -f sample/grpc-ping/sample.yaml
1. Fetch the created ingress hostname and IP.

```
# Put the Ingress Host name into an environment variable.
# Put the Host name into an environment variable.
export SERVICE_HOST=`kubectl get route grpc-ping -o jsonpath="{.status.domain}"`

# Put the Ingress IP into an environment variable.
export SERVICE_IP=`kubectl get ingress grpc-ping-ela-ingress -o jsonpath="{.status.loadBalancer.ingress[*]['ip']}"`
# Put the ingress IP into an environment variable.
export SERVICE_IP=`kubectl get svc knative-ingressgateway -n istio-system -o jsonpath="{.status.loadBalancer.ingress[*].ip}"`
```

1. Use the client to send message streams to the gRPC server
Expand Down
21 changes: 15 additions & 6 deletions serving/samples/helloworld-csharp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,24 @@ folder) you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use `kubectl get ing` to
list the ingress points in the cluster. It may take a few seconds for the
ingress point to be created.
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-csharp-ingress helloworld-csharp.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-csharp -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-csharp helloworld-csharp.default.example.com
```

1. Now you can make a request to your app to see the result. Replace
Expand Down
21 changes: 15 additions & 6 deletions serving/samples/helloworld-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,24 @@ folder) you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use `kubectl get ing` to
list the ingress points in the cluster. It may take a few seconds for the
ingress point to be created.
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-go-ingress helloworld-go.default.example.com,*.helloworld-go.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-go -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-go helloworld-go.default.example.com
```

1. Now you can make a request to your app to see the results. Replace
Expand Down
21 changes: 15 additions & 6 deletions serving/samples/helloworld-java/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,15 +139,24 @@ folder) you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use `kubectl get ing` to
list the ingress points in the cluster. It may take a few seconds for the
ingress point to be created.
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-java-ingress helloworld-java.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-java -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-java helloworld-java.default.example.com
```

1. Now you can make a request to your app to see the result. Replace
Expand Down
23 changes: 16 additions & 7 deletions serving/samples/helloworld-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,24 @@ folder) you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use `kubectl get ing` to
list the ingress points in the cluster. It may take a few seconds for the
ingress point to be created.
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-nodejs-ingress helloworld-nodejs.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-nodejs -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-nodejs helloworld-nodejs.default.example.com
```

1. Now you can make a request to your app to see the result. Replace
Expand All @@ -182,4 +191,4 @@ To remove the sample app from your cluster, delete the service record:

```shell
kubectl delete -f service.yaml
```
```
21 changes: 16 additions & 5 deletions serving/samples/helloworld-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ following instructions recreate the source files from this folder.

## Building and deploying the sample

Once you have recreated the sample code files (or used the files in the sample folder)
Once you have recreated the sample code files (or used the files in the sample folder)
you're ready to build and deploy the sample app.

1. Use Docker to build the sample code into a container. To build and push with
Expand Down Expand Up @@ -98,13 +98,24 @@ you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use kubectl to list the ingress points in the cluster:
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-php-ingress helloworld-php.default.example.com,*.helloworld-php.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-php -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-php helloworld-php.default.example.com
```

1. Now you can make a request to your app to see the result. Replace
Expand Down
23 changes: 17 additions & 6 deletions serving/samples/helloworld-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ TARGET is not specified, it will use "NOT SPECIFIED" as the TARGET.
## Steps to recreate the sample code

While you can clone all of the code from this directory, hello world apps are
generally more useful if you build them step-by-step.
generally more useful if you build them step-by-step.
The following instructions recreate the source files from this folder.

1. Create a new directory and cd into it:
Expand Down Expand Up @@ -110,16 +110,27 @@ folder) you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use kubectl to list the ingress points in the cluster:
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-python-ingress helloworld-python.default.example.com,*.helloworld-python.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-python -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-python helloworld-python.default.example.com
```

1. Now you can make a request to your app to see the result. Replace `{IP_ADDRESS}`
1. Now you can make a request to your app to see the result. Replace `{IP_ADDRESS}`
with the address you see returned in the previous step.

```shell
Expand Down
31 changes: 21 additions & 10 deletions serving/samples/helloworld-ruby/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ TARGET is not specified, it will use "NOT SPECIFIED" as the TARGET.

## Steps to recreate the sample code

While you can clone all of the code from this directory, hello world apps are
generally more useful if you build them step-by-step.
While you can clone all of the code from this directory, hello world apps are
generally more useful if you build them step-by-step.
The following instructions recreate the source files from this folder.

1. Create a new directory and cd into it:
Expand All @@ -38,7 +38,7 @@ The following instructions recreate the source files from this folder.
end
```

1. Create a file named `Dockerfile` and copy the code block below into it.
1. Create a file named `Dockerfile` and copy the code block below into it.
See [official Ruby docker image](https://hub.docker.com/_/ruby/) for more details.

```docker
Expand Down Expand Up @@ -66,7 +66,7 @@ The following instructions recreate the source files from this folder.
gem 'sinatra'
```

1. Run bundle. If you don't have bundler installed, copy the
1. Run bundle. If you don't have bundler installed, copy the
[Gemfile.lock](./Gemfile.lock) to your working directory.

```shell
Expand Down Expand Up @@ -96,7 +96,7 @@ The following instructions recreate the source files from this folder.

## Build and deploy this sample

Once you have recreated the sample code files (or used the files in the sample folder)
Once you have recreated the sample code files (or used the files in the sample folder)
you're ready to build and deploy the sample app.

1. Use Docker to build the sample code into a container. To build and push with
Expand Down Expand Up @@ -125,16 +125,27 @@ you're ready to build and deploy the sample app.
* Network programming to create a route, ingress, service, and load balance for your app.
* Automatically scale your pods up and down (including to zero active pods).

1. To find the URL and IP address for your service, use kubectl to list the ingress points in the cluster:
1. To find the IP address for your service, use
`kubectl get svc knative-ingressgateway -n istio-system` to get the ingress IP for your
cluster. If your cluster is new, it may take sometime for the service to get asssigned
an external IP address.

```shell
kubectl get ing
kubectl get svc knative-ingressgateway -n istio-system

NAME HOSTS ADDRESS PORTS AGE
helloworld-ruby-ingress helloworld-ruby.default.example.com,*.helloworld-ruby.default.example.com 35.232.134.1 80 1m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d

```

1. To find the URL for your service, use
```
kubectl get services.serving.knative.dev helloworld-ruby -o=custom-columns=NAME:.metadata.name,DOMAIN:.status.domain
NAME DOMAIN
helloworld-ruby helloworld-ruby.default.example.com
```

1. Now you can make a request to your app to see the result. Replace `{IP_ADDRESS}`
1. Now you can make a request to your app to see the result. Replace `{IP_ADDRESS}`
with the address you see returned in the previous step.

```shell
Expand Down
Loading