<p>How to copy all certificates from Kubernetes on one server to Kubernetes 
 on another one?</p>

<p>How to export them?</p>

<p>Possible import step</p>

<pre><code>kubectl create secret tls {{ .Release.Name }}-ingress-tls-secret  --key /tmp/tls.key --cert /tmp/tls.crt [--namespace namespace]
</code></pre>

<p>Which actions should be after import step?</p>

<p>I want to see same certs on another server.</p>

Arthur
<p>kubernetes store the certificate in the secret.</p>

<p>you can simply export the secret and import it on to new kubernetes cluster.</p>

<p>here is one example to export the secret locally</p>

<blockquote>
  <p>kubectl get secret my-secret-name(secret name) --export -o yaml >
  my-secret-name.yaml</p>
</blockquote>

<p><code>my-secret-name.yaml</code> file will be created</p>

<p>now on the new cluster, you can simply import the certificate using generated yaml file</p>

<blockquote>
  <p><code>kubectl apply -f my-secret-name.yaml -n namespace-name</code></p>
</blockquote>

<p>(if want to set in a specific namespace)</p>

<p>after importing the certificate you can simply use them in <code>ingress</code>.</p>
