@@ -23,7 +23,7 @@ that chart in the chart's
23
23
24
24
Otherwise, to install with sensible defaults, run the following command:
25
25
26
- ``` console
26
+ ```
27
27
helm install charts/ups-broker --name ups-broker --namespace ups-broker
28
28
```
29
29
@@ -33,7 +33,7 @@ Because we haven't created any resources in the service-catalog API server yet,
33
33
` kubectl get ` will return an empty list of resources.
34
34
35
35
``` console
36
- kubectl get clusterservicebrokers,clusterserviceclasses,serviceinstances,servicebindings
36
+ $ kubectl get clusterservicebrokers,clusterserviceclasses,serviceinstances,servicebindings
37
37
No resources found.
38
38
```
39
39
@@ -42,12 +42,7 @@ We'll register a broker server with the catalog by creating a new
42
42
Do so with the following command:
43
43
44
44
``` console
45
- kubectl create -f contrib/examples/walkthrough/ups-broker.yaml
46
- ```
47
-
48
- The output of that command should be the following:
49
-
50
- ``` console
45
+ $ kubectl create -f contrib/examples/walkthrough/ups-broker.yaml
51
46
servicebroker "ups-broker" created
52
47
```
53
48
@@ -58,12 +53,7 @@ by querying the broker server to see what services it offers and creates a
58
53
We can check the status of the broker using ` kubectl get ` :
59
54
60
55
``` console
61
- kubectl get clusterservicebrokers ups-broker -o yaml
62
- ```
63
-
64
- We should see something like:
65
-
66
- ``` yaml
56
+ $ kubectl get clusterservicebrokers ups-broker -o yaml
67
57
apiVersion: servicecatalog.k8s.io/v1beta1
68
58
kind: ClusterServiceBroker
69
59
metadata:
@@ -102,11 +92,6 @@ executing:
102
92
103
93
``` console
104
94
$ kubectl get clusterserviceclasses -o=custom-columns=NAME:.metadata.name,EXTERNAL\ NAME:.spec.externalName
105
- ` ` `
106
-
107
- We should see something like :
108
-
109
- ` ` ` console
110
95
NAME EXTERNAL NAME
111
96
4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 user-provided-service
112
97
```
@@ -120,12 +105,7 @@ The UPS broker provides a service with the external name
120
105
offering:
121
106
122
107
``` console
123
- kubectl get clusterserviceclasses 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 -o yaml
124
- ` ` `
125
-
126
- We should see something like :
127
-
128
- ` ` ` yaml
108
+ $ kubectl get clusterserviceclasses 4f6e6cf6-ffdd-425f-a2c7-3c9258ad2468 -o yaml
129
109
apiVersion: servicecatalog.k8s.io/v1beta1
130
110
kind: ClusterServiceClass
131
111
metadata:
@@ -151,11 +131,6 @@ resources available in the cluster by executing:
151
131
152
132
``` console
153
133
$ kubectl get clusterserviceplans -o=custom-columns=NAME:.metadata.name,EXTERNAL\ NAME:.spec.externalName
154
- ` ` `
155
-
156
- We should see something like :
157
-
158
- ` ` ` console
159
134
NAME EXTERNAL NAME
160
135
86064792-7ea2-467b-af93-ac9694d96d52 default
161
136
```
@@ -168,12 +143,7 @@ broker returns.
168
143
You can view the details of this ` ClusterServicePlan ` with this command:
169
144
170
145
``` console
171
- kubectl get clusterserviceplans 86064792-7ea2-467b-af93-ac9694d96d52 -o yaml
172
- ` ` `
173
-
174
- We should see something like :
175
-
176
- ` ` ` yaml
146
+ $ kubectl get clusterserviceplans 86064792-7ea2-467b-af93-ac9694d96d52 -o yaml
177
147
apiVersion: servicecatalog.k8s.io/v1beta1
178
148
kind: ClusterServicePlan
179
149
metadata:
@@ -204,19 +174,14 @@ Unlike `ClusterServiceBroker` and `ClusterServiceClass` resources, `ServiceInsta
204
174
resources must be namespaced, so we'll need to create a namespace to start.
205
175
Do so with this command:
206
176
207
- ` ` ` console
177
+ ```
208
178
kubectl create namespace test-ns
209
179
```
210
180
211
181
Then, create the ` ServiceInstance ` :
212
182
213
183
``` console
214
- kubectl create -f contrib/examples/walkthrough/ups-instance.yaml
215
- ` ` `
216
-
217
- That operation should output :
218
-
219
- ` ` ` console
184
+ $ kubectl create -f contrib/examples/walkthrough/ups-instance.yaml
220
185
serviceinstance "ups-instance" created
221
186
```
222
187
@@ -225,12 +190,7 @@ communicate with the appropriate broker server to initiate provisioning.
225
190
Check the status of that process with this command:
226
191
227
192
``` console
228
- kubectl get serviceinstances -n test-ns ups-instance -o yaml
229
- ` ` `
230
-
231
- We should see something like :
232
-
233
- ` ` ` yaml
193
+ $ kubectl get serviceinstances -n test-ns ups-instance -o yaml
234
194
apiVersion: servicecatalog.k8s.io/v1beta1
235
195
kind: ServiceInstance
236
196
metadata:
@@ -281,12 +241,7 @@ we'll create a `ServiceBinding` resource. Do so with the following
281
241
command:
282
242
283
243
``` console
284
- kubectl create -f contrib/examples/walkthrough/ups-binding.yaml
285
- ` ` `
286
-
287
- That command should output :
288
-
289
- ` ` ` console
244
+ $ kubectl create -f contrib/examples/walkthrough/ups-binding.yaml
290
245
servicebinding "ups-binding" created
291
246
```
292
247
@@ -297,12 +252,7 @@ service catalog controller will insert into a Kubernetes `Secret`. We can check
297
252
the status of this process like so:
298
253
299
254
``` console
300
- kubectl get servicebindings -n test-ns ups-binding -o yaml
301
- ` ` `
302
-
303
- We should see something like :
304
-
305
- ` ` ` yaml
255
+ $ kubectl get servicebindings -n test-ns ups-binding -o yaml
306
256
apiVersion: servicecatalog.k8s.io/v1beta1
307
257
kind: ServiceBinding
308
258
metadata:
@@ -337,7 +287,7 @@ ready to use! If we look at the `Secret`s in our `test-ns` namespace, we should
337
287
see a new one:
338
288
339
289
``` console
340
- kubectl get secrets -n test-ns
290
+ $ kubectl get secrets -n test-ns
341
291
NAME TYPE DATA AGE
342
292
default-token-3k61z kubernetes.io/service-account-token 3 29m
343
293
ups-binding Opaque 2 1m
@@ -350,14 +300,14 @@ Notice that a new `Secret` named `ups-binding` has been created.
350
300
Now, let's unbind from the instance. To do this, we simply * delete* the
351
301
` ServiceBinding ` resource that we previously created:
352
302
353
- ` ` ` console
303
+ ```
354
304
kubectl delete -n test-ns servicebindings ups-binding
355
305
```
356
306
357
307
After the deletion is complete, we should see that the ` Secret ` is gone:
358
308
359
309
``` console
360
- kubectl get secrets -n test-ns
310
+ $ kubectl get secrets -n test-ns
361
311
NAME TYPE DATA AGE
362
312
default-token-3k61z kubernetes.io/service-account-token 3 30m
363
313
```
@@ -367,7 +317,7 @@ default-token-3k61z kubernetes.io/service-account-token 3 30m
367
317
Now, we can deprovision the instance. To do this, we simply * delete* the
368
318
` ServiceInstance ` resource that we previously created:
369
319
370
- ` ` ` console
320
+ ```
371
321
kubectl delete -n test-ns serviceinstances ups-instance
372
322
```
373
323
@@ -377,15 +327,15 @@ Next, we should remove the `ClusterServiceBroker` resource. This tells the servi
377
327
catalog to remove the broker's services from the catalog. Do so with this
378
328
command:
379
329
380
- ` ` ` console
330
+ ```
381
331
kubectl delete clusterservicebrokers ups-broker
382
332
```
383
333
384
334
We should then see that all the ` ClusterServiceClass ` resources that came from that
385
335
broker have also been deleted:
386
336
387
337
``` console
388
- kubectl get clusterserviceclasses
338
+ $ kubectl get clusterserviceclasses
389
339
No resources found.
390
340
```
391
341
@@ -395,20 +345,20 @@ No resources found.
395
345
396
346
To clean up, delete the helm deployment:
397
347
398
- ` ` ` console
348
+ ```
399
349
helm delete --purge ups-broker
400
350
```
401
351
402
352
Then, delete all the namespaces we created:
403
353
404
- ` ` ` console
354
+ ```
405
355
kubectl delete ns test-ns ups-broker
406
356
```
407
357
## Cleaning up the Service Catalog
408
358
409
359
Delete the helm deployment and the namespace:
410
360
411
- ` ` ` console
361
+ ```
412
362
helm delete --purge catalog
413
363
kubectl delete ns catalog
414
364
```
@@ -420,6 +370,6 @@ kubectl delete ns catalog
420
370
If you are using Google Cloud Platform, you may need to run the following
421
371
commands to setup proper firewall rules to allow your traffic get in.
422
372
423
- ` ` ` console
373
+ ```
424
374
gcloud compute firewall-rules create allow-service-catalog-secure --allow tcp:30443 --description "Allow incoming traffic on 30443 port."
425
375
```
0 commit comments