<p>Basically, I am trying to deploy a docker image on K8s in a concourse pipeline. I want to use this <code>resource</code> to deploy.
<a href="https://github.com/jcderr/concourse-kubernetes-resource#installing" rel="nofollow noreferrer">https://github.com/jcderr/concourse-kubernetes-resource#installing</a></p>

<p>However, I coudn't exactly figure out the values of </p>

<pre><code>cluster_ca: _base64 encoded CA pem_
admin_key: _base64 encoded key pem_
admin_cert: _base64 encoded certificate_
</code></pre>

<p>For finding the <code>cluster_ca</code>, I tried to execute a command like the following:</p>

<pre><code>kubectl config view --raw -o json | jq -r '.clusters[0].cluster."certificate-authority-data"' | tr -d '"' | base64 --decode
</code></pre>

<p>And for the <code>admin_ca</code>, I logged into one of the containers in the cluster and <code>cat /var/run/secrets/kubernetes.io/serviceaccount/ca.crt</code></p>

<p>I am not sure if these two values are correct. Also, I am not sure what <code>admin_key</code> is. </p>

<p>Could someone help me to figure this out?</p>

<p>You can use following three commands to identify the cluster_ca, admin_cert and admin_key. Assuming you have set the current context on the kubernetes-admin</p>

<pre><code>[root@ip-10-0-1-13]# kubectl config current-context
kubernetes-admin@kubernetes
</code></pre>

<p>Command for cluster_ca (Output will be Encoded in base64) </p>

<pre><code>kubectl config view current-context --raw -o json | ./jq -r '.clusters[].cluster."certificate-authority-data"'
</code></pre>

<p>Command for admin_cert (Output will be Encoded in base64)</p>

<pre><code>kubectl config view current-context --raw -o json | ./jq -r '.users[].user."client-certificate-data"'
</code></pre>

<p>Command for admin_key (Output will be Encoded in base64)</p>

<pre><code>kubectl config view current-context --raw -o json | ./jq -r '.users[].user."client-key-data"'
</code></pre>
