@@ -155,6 +155,17 @@ open http://localhost:8081/ping
155
155
156
156
Roughly every second you should see the counters go up.
157
157
158
+ Now let's get your service account so that we can dynamically find our brokers:
159
+
160
+ ``` bash
161
+ kubectl get serviceaccounts
162
+ # NAME SECRETS AGE
163
+ # default 1 7m13s
164
+ # odd-dog-netifi-broker 1 5m10s
165
+ ```
166
+
167
+ This service account is also used by the brokers to discover themselves.
168
+
158
169
Now let's launch another ping service, only this time let's use Kubernetes service discovery:
159
170
160
171
``` bash
@@ -164,17 +175,6 @@ kubectl run ping2 --image=netifi/pinger-ping --image-pull-policy=Never --service
164
175
--env=" NETIFI_PROTEUS_DISCOVERY_KUBERNETESPROPERTIES_DEPLOYMENTNAME=odd-dog-netifi-broker"
165
176
```
166
177
167
- Note that you'll have to substitute the service account and deployment name for the name of the helm
168
- chart. You can find that by running:
169
-
170
- ``` bash
171
- helm list
172
- # NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
173
- # odd-dog 1 Fri Apr 5 19:49:54 2019 DEPLOYED netifi-helm-charts-0.0.1 1.6.0 default
174
- ```
175
-
176
- Then add ` -netifi-broker ` to the end of it.
177
-
178
178
You should see that Pong is now incrementing roughly twice as fast, while the Ping services are
179
179
maintaining their individual rates.
180
180
@@ -188,15 +188,15 @@ eval $(minikube docker-env -u)
188
188
And now start an additional Pong service:
189
189
190
190
``` bash
191
- docker run --rm -p 10001 :8080 \
191
+ docker run --rm -p 8080 :8080 \
192
192
-e NETIFI_PROTEUS_DISCOVERY_ENVIRONMENT=static \
193
193
-e NETIFI_PROTEUS_DISCOVERY_STATICPROPERTIES_CONNECTIONTYPE=ws \
194
194
-e NETIFI_PROTEUS_DISCOVERY_STATICPROPERTIES_ADDRESSES=192.168.64.8 \
195
195
-e NETIFI_PROTEUS_DISCOVERY_STATICPROPERTIES_PORT=8101 \
196
196
netifi/pinger-pong:latest
197
197
```
198
198
199
- You can now open: < http://localhost:10001 /pong > to see this Pong service taking requests.
199
+ You can now open: < http://localhost:8080 /pong > to see this Pong service taking requests.
200
200
201
201
Now launch a bunch more ping services:
202
202
@@ -257,7 +257,8 @@ helm init --service-account tiller --history-max 200
257
257
```
258
258
259
259
``` bash
260
- helm install . -f ./setFiles/gkePublicWS.yaml
260
+ helm repo add netifi https://download.netifi.com/helm-charts/
261
+ helm install netifi/netifi-helm-charts -f ./setFiles/gkePublicWS.yaml
261
262
```
262
263
263
264
Go the the GKE Console, find the Daemon Set pods, and wait for them to come up. After it's up you
@@ -280,7 +281,7 @@ the Kubernetes Discovery plugins to connect to the brokers dynamically.
280
281
Here we can even us the load balancer address to connect to the cluster:
281
282
282
283
``` bash
283
- docker run --rm -p 10001 :8080 \
284
+ docker run --rm -p 8080 :8080 \
284
285
-e NETIFI_PROTEUS_DISCOVERY_ENVIRONMENT=static \
285
286
-e NETIFI_PROTEUS_DISCOVERY_STATICPROPERTIES_CONNECTIONTYPE=ws \
286
287
-e NETIFI_PROTEUS_DISCOVERY_STATICPROPERTIES_ADDRESSES=35.222.72.248 \
0 commit comments