<p>I am a neophyte, I'm trying to configure my project on gitlab to be able to integrate it with a kubernetes cluster infrastructure pipeline.
While I am configuring gitlab asked for a certificate and a token. Since kuberntes is deployed on azure, how can I create/retrieve the certicate and required token?
Possibly which user / secret in the kuberntes service does it refer to?</p>
<p><a href="https://i.stack.imgur.com/XFZTx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XFZTx.png" alt="enter image description here" /></a></p>

Jonio
<p>You can get the default values of <em><strong>CA certificate</strong></em> using the below steps :</p>
<p><strong>CA Certificate:</strong></p>
<p><em><strong>CA certificate</strong></em> is  nothing but the Kubernetes certificate that we use in the config file for authenticating to the cluster.</p>
<ol>
<li>Connect to AKS cluster,<code>az aks get-credentials — resource-group &lt;RG&gt; — name &lt;KubeName&gt;</code></li>
<li>Run <code>kubectl get secrets</code> , after you run command in output you will
get a default token name , you can copy the name.</li>
<li>Run <code>kubectl get secret &lt;secret name&gt; -o jsonpath=&quot;{['data']['ca\.crt']}&quot; | base64 --decode</code> to get the
certificate , you can copy the certificate and use it in setting the
runner.</li>
</ol>
<p><strong>Output:</strong></p>
<p><a href="https://i.stack.imgur.com/Chbgo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Chbgo.png" alt="enter image description here" /></a></p>
<p><strong>Token :</strong></p>
<p>The token will be of the <em><strong>service account with cluster-admin permissions</strong></em> which <code>Gitlab</code> will use to access the AKS cluster , so you can create a <em><strong>new admin service account</strong></em> if not created earlier by using below steps:</p>
<ol>
<li><p>Create a Yaml file with below contents :</p>
<pre><code>apiVersion: v1
kind: ServiceAccount
metadata:
  name: gitlab-admin
  namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
  name: gitlab-admin
roleRef:
  apiGroup: rbac.authorization.k8s.io
  kind: ClusterRole
  name: cluster-admin
subjects:
  - kind: ServiceAccount
    name: gitlab-admin
    namespace: kube-system
</code></pre>
</li>
<li><p>Run <code>kubectl apply -f &lt;filename&gt;.yaml</code> to apply and bind the service
account to the cluster.</p>
</li>
<li><p>Run <code>kubectl -n kube-system describe secret $(kubectl -n kube-system get secret | grep gitlab-admin | awk '{print $1}')</code> to get the token
for the Gitlab Admin we created in the file and bind with the
cluster in the previous step. You can copy the token value  and use it in
the runner setting .</p>
</li>
</ol>
<p><strong>Output:</strong></p>
<p><a href="https://i.stack.imgur.com/nXlQ2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nXlQ2.png" alt="enter image description here" /></a></p>
