<p>I have a digicert SSL cert that I want to install in GCP secrets and reference it to one of the ingress resources. Currently have four files</p>
<pre><code>privatekey.pem
{domain-name.crt}
DigiCertca.crt
Trustedroot.crt
</code></pre>

Jainam Shah
<p>As @Blender Fox posted in the comment, in the cluster, you can import already-issued certificates.</p>
<p>Use <code>--from-file</code> or <code>--from-env-file</code> to generate a Secret from one or more files. The file must be in plaintext format; it is unimportant what extension it has.</p>
<p>The command states:</p>
<pre><code>kubectl create secret SECRET_TYPE SECRET_NAME
  --from-file PATH_TO_FILE1 
  --from-file PATH_TO_FILE2
</code></pre>
<p>Change the <em>PATH_TO_FILE1</em> and <em>PATH_TO_FILE2</em> in your case to the appropriate <em>.pem</em> and <em>.crt</em> files, like @Blender Fox indicated.</p>
<p>Or</p>
<p>If they are in a directory;</p>
<pre><code>kubectl create secret SECRET_TYPE SECRET_NAME \
  --from-file PATH_TO_DIRECTORY
</code></pre>
<p>How to build secrets from files is described in GCP <a href="https://cloud.google.com/kubernetes-engine/docs/concepts/secret#creating_secrets_from_files" rel="nofollow noreferrer">documentation</a>.</p>
