Adding K8s Cluster to Gitlab for CI/CD

My setup:

  • 1 gitlab VM (ubuntu 16.04, native install)
  • 1 Rancher VM. No FQDN. Access webui with self-signed cert
  • 3x ubuntu 18.04 VMs running rancher kubernetes
  • 1 public IP (80/443 port forwarded to nginx ingress in k8s)

When I try to add a k8s cluster to gitlab using this documentation, it says

There was a problem authenticating with your cluster. Please ensure your CA Certificate and Token are valid.

Even though I can confirm the token is valid (can log into k8s dashboard with it).

How can I properly add the k8s cluster to gitlab?

1 Like

I am facing the same issue… Do you have any clue?

@bnerDY I have still not found a solution. I will post here if I end up finding one.

Also having this issue.

Also having this issue.

kubectl cluster-info | grep 'Kubernetes master' | awk '/http/ {print $NF}' return https://control.pomazan.xyz/k8s/clusters/c-t7qr5

But in url API need paste https://80.211.195.192:6443