<p>I am trying to send my app to a Google Cloud Cluster using the <code>kubectl</code> command behind a corporative proxy that needs a certificate ".crt" file to be used when doing HTTPS requests.</p>

<p>I already ran the <code>gcloud container clusters get-credentials...</code> command and it also asked for a certificate. I followed the given instructions by Google and I configured my certificate file without any issue and it worked.</p>

<p>But when I try the <code>kubectl get pods</code> I am getting the following message:</p>

<pre><code>"Unable to connect to the server: x509: certificate signed by unknown authority"
</code></pre>

<p>How can I configure my certificate file to be used by the kubectl command?</p>

<p>I did a search about this subject but I found too difficult steps. Could I just run something like this:</p>

<pre><code>kubectl --set_ca_file /path/to/my/cert
</code></pre>

<p>Thank you</p>

WitnessTruth
<p>The short answer up to what I know is no.</p>

<p>here[1] you can see the step by step of how to get this done in the easiest way I found so far, is not a one line way but is the closest to that.</p>

<p>after having your cert files you need to run this:</p>

<pre><code>gcloud compute ssl-certificates create test-ingress-1 \ --certificate [FIRST_CERT_FILE] --private-key [FIRST_KEY_FILE]
</code></pre>

<p>then you need to create your YAML file with the configuration (in the link there are two examples)</p>

<p>run this command:</p>

<pre><code>kubectl apply -f [NAME_OF_YOUR_FILE].yaml
</code></pre>

<p>[1] <a href="https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-multi-ssl" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/how-to/ingress-multi-ssl</a></p>
