Is the kubernetes api exposed by openshift the original kubernetes api?

7/6/2017

Openshift exposes a Kubernetes api. Tools like Spinnaker can access Kubernetes natively.

I would like to access the Kubernetes API exposed by Openshift via Spinnaker.

Is the Kubernetes api that is exposed by Openshift the original Kubernetes api or a modified version? If it is the original API it should be possible to access it directly from Spinnaker?

-- nemoo
kubernetes
openshift
spinnaker

1 Answer

7/6/2017

From https://www.openshift.com/container-platform/kubernetes.html and https://docs.openshift.com/enterprise/3.0/rest_api/kubernetes_v1.html, it can be seen that Openshift includes the original k8s API (v1). Apart from that, it also includes its own API group with custom API objects (https://docs.openshift.com/enterprise/3.0/rest_api/openshift_v1.html). So, as long as you want to use API v1 elements, you can access the API just as you would do with vanilla Kubernetes. Examples of API access can be seen here https://docs.openshift.com/container-platform/3.5/rest_api/index.html#rest-api-example-curl. If you can access with curl, Spinnaker should pose no problem.

EDIT: As Graham Dumpleton says in the comments, you may need to configure some RBAC policies to allow the access for your user: https://docs.openshift.com/enterprise/3.0/admin_guide/manage_authorization_policy.html

-- Javier Salmeron
Source: StackOverflow