So I have this manifest in my project:
apiVersion: v1
kind: Secret
metadata:
name: cambiotoday-secret-key
namespace: default
type: Opaque
stringData:
ct-key: <my_third_party_service_key>
---
# The rest of it, deployment and service.
...
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.
I'm using Skaffold to build my kubernetes application.
According to the K8S documentation:
If your application uses the following configuration file:
apiUrl: "https://my.api.com/api/v1" username: "user" password: "password"
You could store this in a Secret using the following:
apiVersion: v1 kind: Secret metadata: name: mysecret type: Opaque stringData: config.yaml: |- apiUrl: "https://my.api.com/api/v1" username: {{username}} password: {{password}}
Your deployment tool could then replace the {{username}} and {{password}} template variables before running kubectl apply.
What deployment tools? That looks like exactly what I need but I don't know how to set it up.