<p>So I have this manifest in my project:</p>

<pre><code>apiVersion: v1
kind: Secret
metadata:
  name: cambiotoday-secret-key
  namespace: default
type: Opaque
stringData:
  ct-key: &lt;my_third_party_service_key&gt;
---

# The rest of it, deployment and service.
...
</code></pre>

<p>And I'm trying to look for a way where I can push this manifest into my git repository but without publishing the actual key in it. </p>

<p>I'm using Skaffold to build my kubernetes application.</p>

<p>According to the K8S documentation:</p>

<blockquote>
  <p>If your application uses the following configuration file:</p>
  
  <pre><code>apiUrl: "https://my.api.com/api/v1"
username: "user"
password: "password"
</code></pre>
  
  <p>You could store this in a Secret using the following:</p>
  
  <pre><code>apiVersion: v1
kind: Secret
metadata:
 name: mysecret
type: Opaque
stringData:
  config.yaml: |-
    apiUrl: "https://my.api.com/api/v1"
    username: {{username}}
    password: {{password}}
</code></pre>
  
  <p>Your deployment tool could then replace the {{username}} and {{password}} template variables before running kubectl apply.</p>
</blockquote>

<p>What deployment tools? That looks like exactly what I need but I don't know how to set it up.</p>

<p>Have a look at <a href="https://github.com/bitnami-labs/sealed-secrets" rel="nofollow noreferrer">sealed-secrets</a>, it allows you to put an encrypted version of your secrets in Git.</p>

<p>As for deployment tools that allow you to template your YAML, have a look at <a href="https://helm.sh/" rel="nofollow noreferrer">Helm</a>, <a href="https://github.com/kubernetes-sigs/kustomize" rel="nofollow noreferrer">Kustomize</a> or many of the other similar tools. If that doesn't work for you, a little bit of scripting should get your there as well.</p>
