Reputation: 3842
In the context of the OpenShift 3.7 Service Catalog, what would it look like if I wanted to create Service Instances outside of the OpenShift Console UI?
I.e. from a terminal on my local machine, if I wanted to create an instance of a Service Class available in the Service Catalog (e.g. run and an APB available via the Ansible Service Broker) what would the REST resource call look like (assuming there is a REST API available)?
An example using curl
would be appreciated.
The assumption is that there is a REST API available for Service Catalog related resources. If this is not true, what is another integration pattern that would satisfy the requirement above? Does the oc
CLI tool support Service Catalog commands?
Upvotes: 1
Views: 276
Reputation: 15778
The best examples I can point you to are the ones from the incubator repo walkthrough. You'll probably be most interested in the example ServiceInstance and example ServiceBinding.
The service-catalog has a normal Kubernetes API server and the resources work like the other resources you're familiar with do. For example, you could make a new instance of a service in the openshift console and poke around in the API server using:
$ kubectl get serviceinstances
Note, oc get serviceinstances
is another valid form of command to use.
The CLI experience isn't fantastic for kubectl get
for these resources yet, but describe
works very well. In a future release of service-catalog the CLI experience for kubectl get
will be improved.
Upvotes: 2