# How to get access to Kubernetes API?

**URL:** <https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596>\
**Category:** Rancher 2.0 Tech Preview\
**Created:** [October 16, 2017, 11:04pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596 "2017-10-16T23:04:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![iBobik](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ibobik/32/2339_2.png) [@iBobik](https://forums.suse.com/u/iBobik)\
**Post date:** [October 16, 2017, 11:04pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596/1 "2017-10-16T23:04:19Z")

</div>

In installed 2.0 version, but in the UI I can not find information how to get access to Kubernetes API or Dashboard. More specifically I want to connect by kubectl and GitLab CI.

---

<div class="post-metadata">

**Author:** ![Thomas](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Thomas](https://forums.suse.com/u/Thomas)\
**Post date:** [October 17, 2017, 8:24pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596/2 "2017-10-17T20:24:01Z")

</div>

You can get access to Kubernetes Dashboard via the UI in containers tab then advanced.  
Other questions don’t know yet 😉

---

<div class="post-metadata">

**Author:** ![Thomas](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@Thomas](https://forums.suse.com/u/Thomas)\
**Post date:** [October 17, 2017, 8:32pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596/3 "2017-10-17T20:32:56Z")

</div>

I guess Kubernetes API is not loaded/used :

**root@rancher ~ #** docker exec rancher kubectl api-versions  
_error: Couldn’t get available api versions from server: couldn’t get version/kind; json parse error: json: cannot unmarshal string into Go value of type struct { APIVersion string “json:“apiVersion,omitempty””; Kind string “json:“kind,omitempty”” }_

---

<div class="post-metadata">

**Author:** ![cloudnautique](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cloudnautique/32/26_2.png) [@cloudnautique](https://forums.suse.com/u/cloudnautique)\
**Post date:** [October 23, 2017, 7:04pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596/4 "2017-10-23T19:04:12Z")

</div>

@Thomas is correct, under the advanced tab you can gain access to the config.yaml and dashboard for Kubernetes. Once you get the config file if you add it to ~/.kube/config you can then just use kubectl directly from your CLI. Similarly, you can create the config file in your CI system and use kubectl commands from there.

---

<div class="post-metadata">

**Author:** ![iBobik](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ibobik/32/2339_2.png) [@iBobik](https://forums.suse.com/u/iBobik)\
**Post date:** [December 1, 2017, 2:32pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596/5 "2017-12-01T14:32:17Z")

</div>

After hours of trying I was not able to get GitLab CI working with Rancher’s Kubernetes. Probably because of strange behavior of certificates auth - some resources worked with Rancher’s proxy certificate, some had no certificate. Kubectl worked only because there is certs verification turned off, but GitLab requires it.

Is there anybody who successfully made it working together?

---

<div class="post-metadata">

**Author:** ![JannikZed](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/jannikzed/32/4114_2.png) [@JannikZed](https://forums.suse.com/u/JannikZed)\
**Post date:** [February 25, 2018, 2:14pm UTC](https://forums.suse.com/t/how-to-get-access-to-kubernetes-api/7596/6 "2018-02-25T14:14:17Z")

</div>

Hi there,  
I’m also trying to get gitlab’s kubernetes integration to work with rancher 2.0 preview - but no luck. Same certificate problem and no idea, how rancher is using which certificates. I was trying to add certificates and add the rootCA.pem to gitlab - but no luck.  
Somebody from rancher tech here to help with communication with k8 api?

Kind regards
