"Adding an existing Kubernetes cluster"
Link the doc and describe what is wrong with it. https://docs.gitlab.com/ee/user/project/clusters/
Adding an existing Kubernetes cluster
To add an existing Kubernetes cluster to your project:
Navigate to your project’s Operations > Kubernetes page.
Note: You need Maintainer permissions and above to access the Kubernetes page.
- Click Add Kubernetes cluster.
- Click Add an existing Kubernetes cluster and fill in the details:
- Kubernetes cluster name (required) - The name you wish to give the cluster.
- Environment scope (required)- The associated environment to this cluster.
- API URL (required) - It’s the URL that GitLab uses to access the Kubernetes API. Kubernetes exposes several APIs, we want the “base” URL that is common to all of them, e.g., https://kubernetes.example.com rather than https://kubernetes.example.com/api/v1.
- CA certificate (optional) - If the API is using a self-signed TLS certificate, you’ll also need to include the ca.crt contents here.
- Token - GitLab authenticates against Kubernetes using service tokens, which are scoped to a particular namespace. The token used should belong to a service account with cluster-admin privileges. To create this service account:
Create a gitlab service account in the default namespace:
I would like add this few things, that could help many poeple who want link their own Kuebernetes cluster whitout use any cloud service like GKE etc..
I think this documentation need to be a little more explain, like take a look on this "option" to how be able to add your cluster kubernetes to your gitlab by the "wan"
Adding an existing Kubernetes cluster
Requirements
kubeadm init ... --apiserver-advertise-address=0.0.0.0 --apiserver-cert-extra-sans=xxx.xxx.xxx.xxx (Public IP)
To prepare your own "local" cluster be ready to communicate with Gitlab.