How to get access to Kubernetes API?

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.

1 Like

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

1 Like

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”” }

@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.

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?

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