Skip to content

Commit 01b818c

Browse files
tcnghiaknative-prow-robot
authored andcommitted
Update docs to use correct ingress gateway service. (knative#700)
* Update docs to use correct ingress gateway service. * Update wording of knative-ingressgateway deprecation. * Update wording of knative-ingressgateway deprecation per feeeback.
1 parent 166b4d6 commit 01b818c

File tree

32 files changed

+468
-121
lines changed

32 files changed

+468
-121
lines changed

install/Knative-with-Minikube.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,22 @@ If you'd like to view the available sample apps and deploy one of your choosing,
123123
head to the [sample apps](../serving/samples/README.md) repo.
124124

125125
> Note: When looking up the IP address to use for accessing your app, you need
126-
> to look up the NodePort for the `knative-ingressgateway` as well as the IP
126+
> to look up the NodePort for the `istio-ingressgateway` well as the IP
127127
> address used for Minikube. You can use the following command to look up the
128128
> value to use for the {IP_ADDRESS} placeholder used in the samples:
129129
130130
```shell
131-
echo $(minikube ip):$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
131+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
132+
INGRESSGATEWAY=knative-ingressgateway
133+
134+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
135+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
136+
# will be removed in Knative v0.4.
137+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
138+
INGRESSGATEWAY=istio-ingressgateway
139+
fi
140+
141+
echo $(minikube ip):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
132142
```
133143

134144
## Cleaning up

install/Knative-with-Minishift.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,8 +258,19 @@ spec:
258258
' | oc create -f -
259259
# Wait for the hello pod to enter its `Running` state
260260
oc get pod --watch
261+
262+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
263+
INGRESSGATEWAY=knative-ingressgateway
264+
265+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
266+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
267+
# will be removed in Knative v0.4.
268+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
269+
INGRESSGATEWAY=istio-ingressgateway
270+
fi
271+
261272
# Call the service
262-
export IP_ADDRESS=$(oc get svc knative-ingressgateway -n istio-system -o 'jsonpath={.status.loadBalancer.ingress[0].ip}')
273+
export IP_ADDRESS=$(oc get svc $INGRESSGATEWAY -n istio-system -o 'jsonpath={.status.loadBalancer.ingress[0].ip}')
263274
# This should output 'Hello World: Go Sample v1!'
264275
curl -H "Host: helloworld-go.myproject.example.com" http://$IP_ADDRESS
265276
```

install/Knative-with-OpenShift.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,22 @@ If you'd like to view the available sample apps and deploy one of your choosing,
212212
head to the [sample apps](../serving/samples/README.md) repo.
213213

214214
> Note: When looking up the IP address to use for accessing your app, you need
215-
> to look up the NodePort for the `knative-ingressgateway` as well as the IP
215+
> to look up the NodePort for the `istio-ingressgateway` well as the IP
216216
> address used for OpenShift. You can use the following command to look up the
217217
> value to use for the {IP_ADDRESS} placeholder used in the samples:
218218
219219
```shell
220-
export IP_ADDRESS=$(oc get node -o 'jsonpath={.items[0].status.addresses[0].address}'):$(oc get svc knative-ingressgateway -n istio-system -o 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
220+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
221+
INGRESSGATEWAY=knative-ingressgateway
222+
223+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
224+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
225+
# will be removed in Knative v0.4.
226+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
227+
INGRESSGATEWAY=istio-ingressgateway
228+
fi
229+
230+
export IP_ADDRESS=$(oc get node -o 'jsonpath={.items[0].status.addresses[0].address}'):$(oc get svc $INGRESSGATEWAY -n istio-system -o 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
221231
```
222232

223233
## Cleaning up

install/getting-started-knative-app.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,28 @@ assigned an external IP address.
9191
1. To find the IP address for your service, enter:
9292

9393
```shell
94-
kubectl get svc knative-ingressgateway --namespace istio-system
94+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
95+
INGRESSGATEWAY=knative-ingressgateway
9596

96-
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
97-
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
97+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
98+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
99+
# will be removed in Knative v0.4.
100+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
101+
INGRESSGATEWAY=istio-ingressgateway
102+
fi
98103

104+
kubectl get svc $INGRESSGATEWAY --namespace istio-system
105+
106+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
107+
istio-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
99108
```
100109

101110
Take note of the `EXTERNAL-IP` address.
102111

103112
You can also export the IP address as a variable with the following command:
104113

105114
```shell
106-
export IP_ADDRESS=$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.status.loadBalancer.ingress[0].ip}')
107-
115+
export IP_ADDRESS=$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.status.loadBalancer.ingress[0].ip}')
108116
```
109117

110118
> Note: if you use minikube or a baremetal cluster that has no external load
@@ -113,7 +121,7 @@ assigned an external IP address.
113121
> `NodeIP` and `NodePort`, enter the following command:
114122
115123
```shell
116-
export IP_ADDRESS=$(kubectl get node --output 'jsonpath={.items[0].status.addresses[0].address}'):$(kubectl get svc knative-ingressgateway --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
124+
export IP_ADDRESS=$(kubectl get node --output 'jsonpath={.items[0].status.addresses[0].address}'):$(kubectl get svc $INGRESSGATEWAY --namespace istio-system --output 'jsonpath={.spec.ports[?(@.port==80)].nodePort}')
117125
```
118126

119127
1. To find the host URL for your service, enter:

serving/gke-assigning-static-ip-address.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,30 +51,39 @@ In the
5151
address through a config-map later.
5252
1. Copy the **External Address** of the static IP you created.
5353
54-
## Step 2: Update the external IP of the `knative-ingressgateway` service
54+
## Step 2: Update the external IP of `istio-ingressgateway` service
5555
5656
Run following command to configure the external IP of the
57-
`knative-ingressgateway` service to the static IP that you reserved:
57+
`istio-ingressgateway` service to the static IP that you reserved:
5858
5959
```shell
60-
kubectl patch svc knative-ingressgateway --namespace istio-system --patch '{"spec": { "loadBalancerIP": "<your-reserved-static-ip>" }}'
60+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
61+
INGRESSGATEWAY=knative-ingressgateway
62+
63+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
64+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
65+
# will be removed in Knative v0.4.
66+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
67+
INGRESSGATEWAY=istio-ingressgateway
68+
fi
69+
70+
kubectl patch svc $INGRESSGATEWAY --namespace istio-system --patch '{"spec": { "loadBalancerIP": "<your-reserved-static-ip>" }}'
6171
```
6272
63-
## Step 3: Verify the static IP address of `knative-ingressgateway` service
73+
## Step 3: Verify the static IP address of `istio-ingressgateway` service
6474
65-
Run the following command to ensure that the external IP of the
66-
"knative-ingressgateway" service has been updated:
75+
Run the following command to ensure that the external IP of the ingressgateway service has been updated:
6776
6877
```shell
69-
kubectl get svc knative-ingressgateway --namespace istio-system
78+
kubectl get svc $INGRESSGATEWAY --namespace istio-system
7079
```
7180
7281
The output should show the assigned static IP address under the EXTERNAL-IP
7382
column:
7483
7584
```
7685
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
77-
knative-ingressgateway LoadBalancer 12.34.567.890 98.765.43.210 80:32380/TCP,443:32390/TCP,32400:32400/TCP 5m
86+
xxxxxxx-ingressgateway LoadBalancer 12.34.567.890 98.765.43.210 80:32380/TCP,443:32390/TCP,32400:32400/TCP 5m
7887
```
7988
8089
> Note: Updating the external IP address can take several minutes.

serving/samples/autoscale-go/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,17 @@ A demonstration of the autoscaling capabilities of a Knative Serving Revision.
2828

2929
1. Find the ingress hostname and IP and export as an environment variable:
3030
```
31-
export IP_ADDRESS=`kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
31+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
32+
INGRESSGATEWAY=knative-ingressgateway
33+
34+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
35+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
36+
# will be removed in Knative v0.4.
37+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
38+
INGRESSGATEWAY=istio-ingressgateway
39+
fi
40+
41+
export IP_ADDRESS=`kubectl get svc $INGRESSGATEWAY --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
3242
```
3343

3444
## Load the Service

serving/samples/blue-green-deployment.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,11 @@ with Knative.
8787
> Note: If you don't have a custom domain configured for use with Knative, you
8888
> can interact with your app using cURL requests if you have the host URL and IP
8989
> address:
90-
> `curl -H "Host: blue-green-demo.default.example.com" http://IP_ADDRESS`
90+
> `curl -H "Host: blue-green-demo.default.example.com" http://IP_ADDRESS`
9191
> Knative creates the host URL by combining the name of your Route object, the namespace,
9292
> and `example.com`, if you haven't configured a custom domain. For example, `[route-name].[namespace].example.com`.
93-
> You can get the IP address by entering `kubectl get svc knative-ingressgateway --namespace istio-system`
93+
> You can get the IP address by entering `kubectl get svc istio-ingressgateway --namespace istio-system` (or
94+
> `kubectl get svc istio-ingressgateway --namespace istio-system` if using Knative 0.2.x or prior versions)
9495
> and copying the `EXTERNAL-IP` returned by that command. See [Interacting with your app](../../install/getting-started-knative-app.md#interacting-with-your-app)
9596
> for more information.
9697

serving/samples/build-private-repo-go/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,18 +174,30 @@ export SERVICE_HOST=$(kubectl get route private-repos \
174174
```
175175

176176
```shell
177+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
178+
INGRESSGATEWAY=knative-ingressgateway
179+
INGRESSGATEWAY_LABEL=knative
180+
181+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
182+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
183+
# will be removed in Knative v0.4.
184+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
185+
INGRESSGATEWAY=istio-ingressgateway
186+
INGRESSGATEWAY_LABEL=istio
187+
fi
188+
177189
# Put the IP address into an environment variable
178-
export SERVICE_IP=$(kubectl get svc knative-ingressgateway --namespace istio-system \
179-
--output jsonpath="{.status.loadBalancer.ingress[*].ip}")
190+
export SERVICE_IP=$(kubectl get svc $INGRESSGATEWAY --namespace istio-system \
191+
--output jsonpath="{.status.loadBalancer.ingress[*].ip}")
180192
```
181193

182194
> Note: If your cluster is running outside a cloud provider (for example, on
183195
> Minikube), your services will never get an external IP address. In that case,
184196
> use the Istio `hostIP` and `nodePort` as the service IP:
185197
186198
```shell
187-
export SERVICE_IP=$(kubectl get po --selector knative=ingressgateway --namespace istio-system \
188-
--output 'jsonpath= . {.items[0].status.hostIP}'):$(kubectl get svc knative-ingressgateway \
199+
export SERVICE_IP=$(kubectl get po --selector $INGRESSGATEWAY_LABEL=ingressgateway --namespace istio-system \
200+
--output 'jsonpath= . {.items[0].status.hostIP}'):$(kubectl get svc $INGRESSGATEWAY \
189201
--namespace istio-system --output 'jsonpath={.spec.ports[? (@.port==80)].nodePort}')
190202
```
191203

serving/samples/buildpack-app-dotnet/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,19 @@ To access this service using `curl`, we first need to determine its ingress
5959
address:
6060

6161
```shell
62-
$ watch kubectl get svc knative-ingressgateway --namespace istio-system
62+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
63+
INGRESSGATEWAY=knative-ingressgateway
64+
65+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
66+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
67+
# will be removed in Knative v0.4.
68+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
69+
INGRESSGATEWAY=istio-ingressgateway
70+
fi
71+
72+
watch kubectl get svc $INGRESSGATEWAY --namespace istio-system
6373
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
64-
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
74+
xxxxxxx-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
6575
```
6676

6777
Once the `EXTERNAL-IP` gets assigned to the cluster, enter the follow commands
@@ -73,7 +83,7 @@ variables:
7383
export SERVICE_HOST=`kubectl get route buildpack-sample-app --output jsonpath="{.status.domain}"`
7484

7585
# Put the ingress IP into an environment variable.
76-
export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
86+
export SERVICE_IP=`kubectl get svc $INGRESSGATEWAY --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
7787
```
7888

7989
Now curl the service IP to make sure the deployment succeeded:

serving/samples/buildpack-function-nodejs/README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,19 @@ To access this service using `curl`, we first need to determine its ingress
5757
address:
5858

5959
```shell
60-
watch kubectl get svc knative-ingressgateway --namespace istio-system
60+
# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.
61+
INGRESSGATEWAY=knative-ingressgateway
62+
63+
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.
64+
# Use `istio-ingressgateway` instead, since `knative-ingressgateway`
65+
# will be removed in Knative v0.4.
66+
if kubectl get configmap config-istio -n knative-serving &> /dev/null; then
67+
INGRESSGATEWAY=istio-ingressgateway
68+
fi
69+
70+
watch kubectl get svc $INGRESSGATEWAY --namespace istio-system
6171
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
62-
knative-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
72+
xxxxxxx-ingressgateway LoadBalancer 10.23.247.74 35.203.155.229 80:32380/TCP,443:32390/TCP,32400:32400/TCP 2d
6373
```
6474

6575
Once the `EXTERNAL-IP` gets assigned to the cluster, enter the follow commands
@@ -71,7 +81,7 @@ variables:
7181
$ export SERVICE_HOST=`kubectl get route buildpack-function --output jsonpath="{.status.domain}"`
7282

7383
# Put the ingress IP into an environment variable.
74-
$ export SERVICE_IP=`kubectl get svc knative-ingressgateway --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
84+
$ export SERVICE_IP=`kubectl get svc $INGRESSGATEWAY --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`
7585
```
7686

7787
Now curl the service IP to make sure the deployment succeeded:

0 commit comments

Comments
 (0)