Skip to content

Commit f3aedda

Browse files
author
Doug Davis
committed
updates for v06
Signed-off-by: Doug Davis <[email protected]>
1 parent 27a1894 commit f3aedda

File tree

4 files changed

+14
-47
lines changed

4 files changed

+14
-47
lines changed

README.md

+10-39
Original file line numberDiff line numberDiff line change
@@ -219,35 +219,6 @@ Dockerhub namespace name instead of `duglin`, and change `GITREPO`
219219
to be the name of your Github clone of this repo - typically you should
220220
just need to swap `duglin` for your Github name.
221221

222-
#### Setup our network
223-
224-
Before we go any further, we'll need to modify our Istio configuration so that
225-
it allows outbound network traffic from our pods. By default Istio blocks all
226-
outbound traffic. To do this I have this `ingress.yaml` file:
227-
228-
```
229-
# Allow for pods to talk to the internet
230-
apiVersion: v1
231-
kind: ConfigMap
232-
metadata:
233-
annotations:
234-
kubectl.kubernetes.io/last-applied-configuration: |
235-
{"apiVersion":"v1","data":{"istio.sidecar.includeOutboundIPRanges":"*"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"config-network","namespace":"knative-serving"}}
236-
name: config-network
237-
namespace: knative-serving
238-
data:
239-
istio.sidecar.includeOutboundIPRanges: 172.30.0.0/16,172.20.0.0/16,10.10.10.0/24
240-
```
241-
242-
Install this resouce:
243-
244-
```
245-
$ ./kapply ingress.yaml
246-
configmap/config-network created
247-
```
248-
249-
We'll talk more about the `kapply` command later.
250-
251222
#### Secrets
252223

253224
Before we get to the real point of this, which is deploying an application,
@@ -487,16 +458,16 @@ then we give it the name/location of the container image to use.
487458
Once that's done, if you want a couple of seconds for the image to download,
488459
you should then be able to ask for the list of services:
489460
```
490-
$ ./kn service get
491-
NAME DOMAIN GENERATION AGE CONDITIONS READY REASON
492-
helloworld helloworld.default.kndemo.us-south.containers.appdomain.cloud 1 46s 3 OK / 3 True
461+
$ ./kn service list
462+
NAME URL GENERATION AGE CONDITIONS READY REASON
463+
helloworld http://helloworld-default.kndemo.us-south.containers.appdomain.cloud 1 10s 3 OK / 3 True
493464
```
494465

495466
Notice that in there it will show you the full URL of the service that
496467
you can then curl against:
497468

498469
```
499-
$ curl -sf helloworld.default.kndemo.us-south.containers.appdomain.cloud
470+
$ curl -sf helloworld-default.kndemo.us-south.containers.appdomain.cloud
500471
c8xg6: Hello World!
501472
```
502473

@@ -506,7 +477,7 @@ it, route traffic to it and even give it a relatively nice URL.
506477

507478
One more thing.... you can also access it via SSL:
508479
```
509-
$ curl -sf https://helloworld.default.kndemo.us-south.containers.appdomain.cloud
480+
$ curl -sf https://helloworld-default.kndemo.us-south.containers.appdomain.cloud
510481
c8xg6: Hello World!
511482
```
512483

@@ -637,14 +608,14 @@ the full URL of the service, to find that do this:
637608
```
638609
$ kubectl get ksvc
639610
NAME DOMAIN LATESTCREATED LATESTREADY READY REASON
640-
helloworld helloworld.default.kndemo.us-south.containers.appdomain.cloud helloworld-s824d helloworld-s824d True
611+
helloworld helloworld-default.kndemo.us-south.containers.appdomain.cloud helloworld-s824d helloworld-s824d True
641612
```
642613

643614
You'll notice that once the Service is ready the "DOMAIN" column will show
644615
the full URL of the Service and that's what we'll use to call it.
645616

646617
```
647-
$ curl -sf helloworld.default.kndemo.us-south.containers.appdomain.cloud
618+
$ curl -sf helloworld-default.kndemo.us-south.containers.appdomain.cloud
648619
s824d: Hello World!
649620
```
650621
@@ -747,7 +718,7 @@ the request.
747718
So, let's hit it:
748719
749720
```
750-
$ curl -sf helloworld.default.kndemo.us-south.containers.appdomain.cloud
721+
$ curl -sf helloworld-default.kndemo.us-south.containers.appdomain.cloud
751722
p8c2v: Hello World!
752723
```
753724
@@ -936,7 +907,7 @@ pod show up, which is our new version of the app running and ready to be
936907
hit:
937908
938909
```
939-
$ curl -sf helloworld.default.kndemo.us-south.containers.appdomain.cloud
910+
$ curl -sf helloworld-default.kndemo.us-south.containers.appdomain.cloud
940911
7vh75: Now is the time for all good...
941912
```
942913
@@ -1031,7 +1002,7 @@ To see this rollout, we'll need to geneate some load. Make sure you've
10311002
built the `load` tool (`make load`):
10321003
10331004
```
1034-
$ ./load 10 30 http://helloworld.default.kndemo.us-south.containers.appdomain.cloud
1005+
$ ./load 10 30 http://helloworld-default.kndemo.us-south.containers.appdomain.cloud
10351006
```
10361007
10371008
What you should see is something like this:

demo

+4-8
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ function cleanDemo {
2525
-f service1.yaml \
2626
-f github.yaml \
2727
-f rebuild.yaml \
28-
-f secrets.yaml \
29-
-f ingress.yaml
28+
-f secrets.yaml
3029

3130
kubectl delete \
3231
clusterchannelprovisioner.eventing.knative.dev/in-memory-channel
@@ -68,9 +67,6 @@ doit ibmcloud ks cluster-config -s --export ${CLUSTER}
6867
doit $(cat out)
6968
$(cat out)
7069

71-
comment Enable external internet access from our pods
72-
doit ./kapply ingress.yaml
73-
7470
comment Create the secrets used for accessing DockerHub and Github
7571
doit ./kapply secrets.yaml
7672

@@ -92,9 +88,9 @@ scroll helloworld.go
9288

9389
comment Use the easy CLI first
9490
doit ./kn service create --image duglin/helloworld helloworld
95-
wait ./kn service get \| grep helloworld.default
96-
doit ./kn service get
97-
APPURL=$(grep helloworld out | sed "s/^.* \(helloworld.def.*cloud\).*$/\1/")
91+
wait ./kn service list \| grep helloworld.default
92+
doit ./kn service list
93+
APPURL=$(grep helloworld out | sed "s/^.*\(helloworld.def.*cloud\).*$/\1/")
9894
doit curl -sf ${APPURL}
9995
doit curl -sfk https://${APPURL}
10096
doit ./showresources all

demo.tar

20 KB
Binary file not shown.

kn

711 KB
Binary file not shown.

0 commit comments

Comments
 (0)