<p>My question is very short: <strong>how does the process look like to retrieve a ca certificate for an existing Kubernetes cluster to connect gitlab with this cluster?</strong></p>
<p>After studying the docs, everything is fine, but I don‘t understand which cluster certificate is meant.</p>
<p>Many thanks and have a nice day everyone!</p>

andreas.teich
<p>In this <a href="https://docs.gitlab.com/ee/user/project/clusters/add_existing_cluster.html#how-to-add-an-existing-cluster" rel="nofollow noreferrer">gitlab documentation</a> you can find instructions how to add an existing cluster to the gitlab and what do you need to do so.</p>
<blockquote>
<p><strong>CA certificate</strong>  (required) - A valid Kubernetes certificate is needed to authenticate to the cluster. We use the certificate created by default.</p>
</blockquote>
<p>This is a certificate created by default inside the cluster.</p>
<p>All you have to do is get it and this is written in following steps:</p>
<blockquote>
<p>i.  List the secrets with  <code>kubectl get secrets</code>, and one should be named similar to  <code>default-token-xxxxx</code>. Copy that token name for use below.
ii.  Get the certificate by running this command:</p>
</blockquote>
<pre><code>kubectl get secret &lt;secret name&gt; -o jsonpath=&quot;{['data']['ca\.crt']}&quot; | base64 --decode
</code></pre>
<blockquote>
<p>If the command returns the entire certificate chain, you must copy the Root CA certificate and any intermediate certificates at the bottom of the chain. A chain file has following structure:</p>
</blockquote>
<pre><code>   -----BEGIN MY CERTIFICATE-----
   -----END MY CERTIFICATE-----
   -----BEGIN INTERMEDIATE CERTIFICATE-----
   -----END INTERMEDIATE CERTIFICATE-----
   -----BEGIN INTERMEDIATE CERTIFICATE-----
   -----END INTERMEDIATE CERTIFICATE-----
   -----BEGIN ROOT CERTIFICATE-----
   -----END ROOT CERTIFICATE-----
</code></pre>
