-
|
Hello there, I'm using kubernetes-external-secrets to inject secrets stored in external vaults into Kubernetes Secrets. The controller creates the secret in Secret's |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hello @dpolicastro,
A simple example: $ cat test-secret.yaml
apiVersion: v1
kind: Secret
metadata:
name: test-secret
stringData:
testkey: testdata
$ kubectl apply -f test-secret.yaml
secret/test-secret created
$ kubectl get secret test-secret -o jsonpath='{.data.testkey}' | base64 -d && echo
testdataSo long story, short answer: Yes, what you want to do is possible :) |
Beta Was this translation helpful? Give feedback.
Hello @dpolicastro,
stringDatais really just a helping shortcut that lets you create a secret without having to base64 encode the secret's data first. When you create aSecretwithstringDatainstead ofdata, Kubernetes will base64 encode all values and replacestringDatawithdata.A simple example:
So long story, short answer: Yes, what you want to do is possible :)