Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Open Service Broker APIとKubernetes Service Catalog #k8sjp

6.710 Aufrufe

Veröffentlicht am

Kubernetes Meetup Tokyo #10

Veröffentlicht in: Technologie
  • Als Erste(r) kommentieren

Open Service Broker APIとKubernetes Service Catalog #k8sjp

  1. 1. 1 Open Service Broker API Kubernetes Service Catalog 2017-03-08 Kubernetes Meetup Tokyo #10 Toshiaki Maki (@making)
  2. 2. Who am I ? 2 Toshiaki Maki (@making) https://blog.ik.am Sr. Solutions Architect @Pivotal Japan Spring / Cloud Foundry / Concourse / Kubernetes
  3. 3. Agenda 3 • Open Service Broker API • Kubernetes Service Catalog • Demo1 • Demo2 • Ecosystem
  4. 4. Open Service Broker API
  5. 5. 
 5
  6. 6. 
 5 Where: Who: What: in Kubernetes Outside of k8s Managed Service Developer VM Operator Container Database/Schema API
  7. 7. 6 Developer DBA
  8. 8. 6 Developer DBA
  9. 9. 6 Developer DBA
  10. 10. 6 Developer DBA
  11. 11. 6 Developer DBA (... N )
  12. 12. 6 Developer DBA
  13. 13. 6 Developer DBA
  14. 14. 6 Developer DBA
  15. 15. 6 Developer DBA (... N )
  16. 16. 6 Developer DBA (... N )
  17. 17. 6 Developer DBA (... N ) Excel Y^Y^Y^Y^Y^Y^Y
  18. 18. 7 Developer DBA
  19. 19. 7 Developer DBA ServiceBroker
  20. 20. Service Broker 8 Developer DBA ServiceBroker
  21. 21. Service Broker 8 Developer ServiceBroker
  22. 22. Service Broker 9 Developer ServiceBroker Service Instance Service Binding
  23. 23. Service Broker in Cloud Foundry 10 ServiceBroker CloudController Create a VM or Create a Database Create a user Provision a service instance Bind a service binding cf create-service cf bind-service
  24. 24. Marketplace 11
  25. 25. Service Broker in Cloud Foundry 12 ServiceBroker CloudController Create a VM or Create a Database Create a user Provision a service instance Bind a service binding cf create-service cf bind-service
  26. 26. Service Broker in Cloud Foundry 12 ServiceBroker CloudController Create a VM or Create a Database Create a user Provision a service instance Bind a service binding cf create-service cf bind-service
  27. 27. Service Broker in Cloud Foundry 12 ServiceBroker CloudController Create a VM or Create a Database Create a user Provision a service instance Bind a service binding cf create-service cf bind-service Open Service Broker API
  28. 28. Open Service Broker API 13 https://www.openservicebrokerapi.org/ Cloud Foundry Service Broker Kubernetes OpenShift
  29. 29. API 7 14 https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md 🔸Catalog 🔸Service Instance 🔸Service Binding DELETE /v2/service_instance/{instanceId}/service_bindings/{bindingId} PUT /v2/service_instance/{instanceId}/service_bindings/{bindingId} DELETE /v2/service_instance/{instanceId} PUT /v2/service_instance/{instanceId} GET /v2/catalog
  30. 30. API 7 14 https://github.com/openservicebrokerapi/servicebroker/blob/v2.13/spec.md 🔸Catalog 🔸Service Instance 🔸Service Binding DELETE /v2/service_instance/{instanceId}/service_bindings/{bindingId} PUT /v2/service_instance/{instanceId}/service_bindings/{bindingId} DELETE /v2/service_instance/{instanceId} PUT /v2/service_instance/{instanceId} GET /v2/catalog InstanceId BindingId OSB
  31. 31. Kubernetes Service Catalog
  32. 32. Service Broker in Kubernetes 16 ServiceBroker Create a VM or Create a Database Create a user Provision a service instance Bind a service binding APIServer
  33. 33. Service Broker in Kubernetes 16 ServiceBroker Create a VM or Create a Database Create a user Provision a service instance Bind a service binding APIServer 🤔
  34. 34. Service Broker in Kubernetes 16 ServiceBroker Create a VM or Create a Database Create a user Provision a service instance Bind a service binding APIServer 🤔ServiceCatalog
  35. 35. Service Catalog 17 https://github.com/kubernetes-incubator/service-catalog Open Service Broker API Kubernetes Service Catalog SIG
  36. 36. New Resources in Service Catalog 18 • ClusterServiceBroker • ClusterServiceClass • ClusterServicePlan • ServiceInstance • ServiceBinding
  37. 37. New Resources in Service Catalog 18 • ClusterServiceBroker • ClusterServiceClass • ClusterServicePlan • ServiceInstance • ServiceBinding k8s Admin Service Catalog Developer
  38. 38. Service Catalog Workflow 19 ServiceBroker ServiceCatalog Create a VM or Create a Database Create a user Provision a service instance Bind a service binding kubectl apply -f service-instance.yml kubectl apply -f service-binding.yml Service Instance Service Binding k8s Resource 🔑 Secret
  39. 39. Service Catalog Workflow 19 ServiceBroker ServiceCatalog Create a VM or Create a Database Create a user Provision a service instance Bind a service binding kubectl apply -f service-instance.yml kubectl apply -f service-binding.yml Service Instance Service Binding k8s Resource 🔑 Secret Service Binding Credentials Secret
  40. 40. How to install service catalog 20 helm repo add svc-cat https://svc-catalog-charts.storage.googleapis.com helm install svc-cat/catalog --name catalog --namespace catalog --set insecure=true
  41. 41. How to install service broker 21 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ClusterServiceBroker metadata: name: demo spec: url: https://my-service-broker.example.com authInfo: basic: secretRef: name: demo-broker-secret namespace: osb
  42. 42. How to install service broker 21 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ClusterServiceBroker metadata: name: demo spec: url: https://my-service-broker.example.com authInfo: basic: secretRef: name: demo-broker-secret namespace: osb apiVersion: v1 kind: Secret metadata: name: demo-broker-secret namespace: osb type: Opaque data: username: dXNlcm5hbWU= password: cGFzc3dvcmQ=
  43. 43. How to install service broker 21 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ClusterServiceBroker metadata: name: demo spec: url: https://my-service-broker.example.com authInfo: basic: secretRef: name: demo-broker-secret namespace: osb apiVersion: v1 kind: Secret metadata: name: demo-broker-secret namespace: osb type: Opaque data: username: dXNlcm5hbWU= password: cGFzc3dvcmQ= Service Broker Basic
  44. 44. List cluster service classes 22 $ kubectl get clusterserviceclasses -o=custom- columns=CLASS:.spec.externalName,DESCRIPTION:.spec. description CLASS DESCRIPTION shared-mysql Shared MySQL
  45. 45. List cluster service plans 23 $ kubectl get clusterserviceplans -o=custom- columns=CLASS:.spec.clusterServiceBrokerName,PLAN:. spec.externalName,DESCRIPTION:.spec.description CLASS PLAN DESCRIPTION shared-mysql shared Shared
  46. 46. How to create service instance 24 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceInstance metadata: name: hello spec: clusterServiceClassExternalName: shared-mysql clusterServicePlanExternalName: shared
  47. 47. How to create service instance 24 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceInstance metadata: name: hello spec: clusterServiceClassExternalName: shared-mysql clusterServicePlanExternalName: shared Service Plan
  48. 48. How to create service binding 25 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceBinding metadata: name: hello-key spec: instanceRef: name: hello secretName: hello-key-secret
  49. 49. How to create service binding 25 apiVersion: servicecatalog.k8s.io/v1beta1 kind: ServiceBinding metadata: name: hello-key spec: instanceRef: name: hello secretName: hello-key-secret Credentials Secret Service Instance
  50. 50. ServiceCatalog DEMO1: MySQL Service Broker 26 ServiceBroker CREATE DATABASE CREATE USER Provision a service instance Bind a service binding https://github.com/making/shared-mysql-service-broker
  51. 51. ServiceCatalog DEMO2: Kafka Service Broker 27 https://github.com/making/cloud-karafka-service-broker ServiceBroker Create a topic Provision a service instance Bind a service binding Share credentials
  52. 52. Ecosystem
  53. 53. Open Service Brokers 29 • GCP Service Broker • AWS Service Broker • Azure Service Broker • Helm Service Broker • On-demand BOSH Service Broker • Ansible Service Broker • MySQL Service Broker • Kafka Service Broker • Pivotal Container Service (PKS) https://pivotal.io/platform/services-marketplace
  54. 54. Open Service Brokers 29 • GCP Service Broker • AWS Service Broker • Azure Service Broker • Helm Service Broker • On-demand BOSH Service Broker • Ansible Service Broker • MySQL Service Broker • Kafka Service Broker • Pivotal Container Service (PKS) k8s cluster provsion Service Broker https://pivotal.io/platform/services-marketplace
  55. 55. Open Service Broker 30 • (Go) borkerapi
 https://github.com/pivotal-cf/brokerapi • (Java) Spring Cloud Open Service Broker
 https://github.com/spring-cloud/spring-cloud-open-service-broker
  56. 56. Tools 31 • eden ... Open Service Broker API CLI
 https://github.com/starkandwayne/eden • svcat ... Service Catalog CLI
 https://github.com/kubernetes-incubator/service-catalog/tree/master/cmd/svcat
  57. 57. 32 • Service Broker API • Open Service Broker API • Service Catalog k8s Open Service Broker API
  58. 58. Ecosystem 33 🤝 Thank you for your attention!
  59. 59. We are hiring! :) 34 https://pivotal.io/careers Thank you for your attention!

×