@@ -42,8 +42,9 @@ issue by adding a comment to it of the form:
4242 #dibs
4343
4444However, it is a good idea to discuss the issue, and your intent to work on it,
45- with the other members via the slack channel to make sure there isn't some
46- other work alread going on with respect to that issue.
45+ with the other members via the [ slack channel] ( https://kubernetes.slack.com/messages/sig-service-catalog )
46+ to make sure there isn't some other work already going on with respect to that
47+ issue.
4748
4849When you create a pull request (PR) that completely addresses an open issue
4950please include a line in the initial comment that looks like:
@@ -211,263 +212,18 @@ export KUBECONFIG=/home/yippee/code/service-catalog/.kubeconfig
211212Use the [ ` catalog ` chart] ( ../charts/catalog ) to deploy the service
212213catalog into your cluster. The easiest way to get started is to deploy into a
213214cluster you regularly use and are familiar with. One of the choices you can
214- make when deploying the catalog is whether to back the API server with etcd or
215- third party resources. Currently, etcd is the best option; TPR support is
216- experimental and still under development.
215+ make when deploying the catalog is whether to make the API server store its
216+ resources in an external etcd server, or in third party resources.
217217
218- ## Demo Walkthrough
218+ If you choose etcd storage, the helm chart will launch an etcd server for you
219+ in the same pod as the service-catalog API server. You will be responsible for
220+ the data in the etcd server container.
219221
220- The rest of this guide is a walkthrough that is essentially the same as a
221- basic demo of the catalog.
222+ If you choose third party resources storage, the helm chart will not launch an
223+ etcd server, but will instead instruct the API server to store all resources in
224+ the Kubernetes cluster as third party resources.
222225
223- Now that the system has been deployed to our Kubernetes cluster, we can use
224- ` kubectl ` to talk to the service catalog API server. The service catalog API
225- has four resources:
226+ ## Demo walkthrough
226227
227- - ` Broker ` : a service broker whose services appear in the catalog
228- - ` ServiceClass ` : a service offered by a particular service broker
229- - ` Instance ` : an instance of a ` ServiceClass ` provisioned by the ` Broker ` for
230- that ` ServiceClass `
231- - ` Binding ` : a binding to an ` Instance ` which is manifested into a Kubernetes
232- namespace
233-
234- These resources are building blocks of the service catalog in Kubernetes from an
235- API standpoint.
236-
237- ----
238-
239- #### Note: accessing the service catalog
240-
241- Unfortunately, ` kubectl ` doesn't know how to speak to both the service catalog
242- API server and the main Kubernetes API server without switching contexts or
243- ` kubeconfig ` files. For now, the best way to access the service catalog API
244- server is via a dedicated ` kubeconfig ` file. You can manage the kubeconfig in
245- use within a directory using the ` direnv ` tool.
246-
247- Additionally, you'll need to have a version 1.6 beta build of ` kubectl ` to execute
248- ` create ` operations on the service catalog API server. To get one, execute the following:
249-
250- ``` console
251- curl -o kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.0-beta.3/bin/darwin/amd64/kubectl
252- chmod +x ./kubectl
253- ```
254-
255- For the rest of this document, we'll assume that all ` kubectl ` commands are using this newly
256- downloaded version 1.6.
257-
258- ----
259-
260- Because we haven't created any resources in the service-catalog API server yet,
261- ` kubectl get ` will return an empty list of resources:
262-
263- $ kubectl get brokers,serviceclasses,instances,bindings
264-
265- ### Installing a UPS broker
266- Service Catalog requires brokers to operate and there is a User Provided
267- Service broker (UPS from now on), which allows consumption of existing
268- services through the Service Catalog model. Just like any other broker, the
269- UPS broker needs to be running somewhere before it can be added to the
270- catalog. We need to deploy it first by using the
271- [ ` ups-broker ` chart] ( ../charts/ups-broker ) into your cluster, just like
272- you installed the catalog chart above.
273-
274- ### Registering a UPS Broker
275-
276- Next, we'll register a service broker with the catalog. To do this, we'll
277- create a new [ ` Broker ` ] ( ../contrib/examples/walkthrough/ups-broker.yaml )
278- resource:
279-
280- $ kubectl create -f contrib/examples/walkthrough/ups-broker.yaml
281- broker "ups-broker" created
282-
283- Kubernetes APIs are intention based; creating this resource indicates that the
284- want for the service broker it represents to be consumed in the catalog. When
285- we create the resource, the controller handles loading that broker into the
286- catalog by seeing what services it provides and adding them to the catalog.
287-
288- We can check the status of the broker using ` kubectl get ` :
289-
290- $ kubectl get brokers ups-broker -o yaml
291-
292- We should see something like:
293-
294- ``` yaml
295- apiVersion : servicecatalog.k8s.io/v1alpha1
296- kind : Broker
297- metadata :
298- creationTimestamp : 2017-03-03T04:11:17Z
299- finalizers :
300- - kubernetes
301- name : ups-broker
302- resourceVersion : " 6"
303- selfLink : /apis/servicecatalog.k8s.io/v1alpha1/brokers/ups-broker
304- uid : 72fa629b-ffc7-11e6-b111-0242ac110005
305- spec :
306- url : http://ups-broker.ups-broker.svc.cluster.local:8000
307- status :
308- conditions :
309- - message : Successfully fetched catalog from broker
310- reason : FetchedCatalog
311- status : " True"
312- type : Ready
313- ` ` `
314-
315- Notice that the controller has set this brokers ` status` field to reflect that
316- it's catalog has been added to our cluster's catalog.
317-
318- # ## Viewing ServiceClasses
319-
320- The controller created a `ServiceClass` for each service that the broker we
321- added provides. We can view the `ServiceClass` resources available in the
322- cluster by doing :
323-
324- $ kubectl get serviceclasses
325- NAME KIND
326- user-provided-service ServiceClass.v1alpha1.servicecatalog.k8s.io
327-
328- It looks like the broker we added provides a service called the `user-provided-
329- service`. Let's check it out :
330-
331- $ kubectl get serviceclasses user-provided-service -o yaml
332-
333- We should see something like :
334-
335- ` ` ` yaml
336- apiVersion: servicecatalog.k8s.io/v1alpha1
337- kind: ServiceClass
338- metadata:
339- creationTimestamp: 2017-03-03T04:11:17Z
340- name: user-provided-service
341- resourceVersion: "7"
342- selfLink: /apis/servicecatalog.k8s.io/v1alpha1/serviceclassesuser-provided-service
343- uid: 72fef5ce-ffc7-11e6-b111-0242ac110005
344- brokerName: ups-broker
345- osbGuid: 4F6E6CF6-FFDD-425F-A2C7-3C9258AD2468
346- bindable: false
347- planUpdatable: false
348- plans:
349- - name: default
350- osbFree: true
351- osbGuid: 86064792-7ea2-467b-af93-ac9694d96d52
352- ` ` `
353-
354- # ## Provisioning a new Instance
355-
356- Let's provision a new instance of the `user-provided-service`. To do this, we
357- create a new [`Instance`](../contrib/examples/walkthrough/ups-instance.yaml) to
358- indicate that we want to provision a new instance of that service :
359-
360- $ kubectl create -f contrib/examples/walkthrough/ups-instance.yaml
361- instance "ups-instance" created
362-
363- We can check the status of the `Instance` using `kubectl get` :
364-
365- $ kubectl get instances -n test-ns ups-instance -o yaml
366-
367- We should see something like :
368-
369- ` ` ` yaml
370- apiVersion: servicecatalog.k8s.io/v1alpha1
371- kind: Instance
372- metadata:
373- creationTimestamp: 2017-03-03T04:26:08Z
374- name: ups-instance
375- namespace: test-ns
376- resourceVersion: "9"
377- selfLink: /apis/servicecatalog.k8s.io/v1alpha1/namespaces/test-ns/instances/ups-instance
378- uid: 8654e626-ffc9-11e6-b111-0242ac110005
379- spec:
380- osbGuid: 34c984e1-4626-4574-8a95-9e500d0d48d3
381- planName: default
382- serviceClassName: user-provided-service
383- status:
384- conditions:
385- - message: The instance was provisioned successfully
386- reason: ProvisionedSuccessfully
387- status: "True"
388- type: Ready
389- ` ` `
390-
391- # ## Bind to the Instance
392-
393- Now that our `Instance` has been created, let's bind to it. To do this, we
394- create a new [`Binding`](../contrib/examples/walkthrough/ups-binding.yaml).
395-
396- $ kubectl create -f contrib/examples/walkthrough/ups-binding.yaml
397- binding "ups-binding" created
398-
399- We can check the status of the `Instance` using `kubectl get` :
400-
401- $ kubectl get bindings -n test-ns ups-binding -o yaml
402-
403- We should see something like :
404-
405- ` ` ` yaml
406- apiVersion: servicecatalog.k8s.io/v1alpha1
407- kind: Binding
408- metadata:
409- creationTimestamp: 2017-03-07T01:44:36Z
410- finalizers:
411- - kubernetes
412- name: ups-binding
413- namespace: test-ns
414- resourceVersion: "29"
415- selfLink: /apis/servicecatalog.k8s.io/v1alpha1/namespaces/test-ns/bindings/ups-binding
416- uid: 9eb2cdce-02d7-11e7-8edb-0242ac110005
417- spec:
418- instanceRef:
419- name: ups-instance
420- osbGuid: b041db94-a5a0-41a2-87ae-1025ba760918
421- secretName: my-secret
422- status:
423- conditions:
424- - message: Injected bind result
425- reason: InjectedBindResult
426- status: "True"
427- type: Ready
428- ` ` `
429-
430- Notice that the status has a ready condition set. This means our binding is
431- ready to use. If we look at the secrets in our `test-ns` namespace in
432- kubernetes, we should see :
433-
434- $ kubectl get secrets -n test-ns
435- NAME TYPE DATA AGE
436- default-token-3k61z kubernetes.io/service-account-token 3 29m
437- my-secret Opaque 2 1m
438-
439- Notice that a secret named `my-secret` has been created in our namespace.
440-
441- # ## Unbind from the Instance
442-
443- Now, let's unbind from the Instance. To do this, we just delete the `Binding`
444- that we created :
445-
446- $ kubectl delete -n test-ns bindings ups-binding
447-
448- If we check the secrets in the `test-ns` namespace, we should see that the
449- secret we were injected with has been deleted :
450-
451- $ kubectl get secrets -n test-ns
452- NAME TYPE DATA AGE
453- default-token-3k61z kubernetes.io/service-account-token 3 30m
454-
455- # ## Deprovision the Instance
456-
457- Now, we can deprovision the instance. To do this, we just delete the `Instance`
458- that we created :
459-
460- $ kubectl delete -n test-ns instances ups-instance
461-
462- # ## Delete the broker
463-
464- When an administrator wants to remove a broker and the services it offers from
465- the catalog, they can just delete the broker :
466-
467- $ kubectl delete brokers ups-broker
468-
469- And we should see that all the `ServiceClass` resources that came from that
470- broker were cleaned up :
471-
472- $ kubectl get serviceclasses
473- No resources found
228+ Check out the [ walk-through] ( WALKTHROUGH.md ) for a detailed guide of an example
229+ deployment.
0 commit comments