-
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
testdata So long story, short answer: Yes, what you want to do is possible :) |
Beta Was this translation helpful? Give feedback.
Hello @dpolicastro,
stringData
is really just a helping shortcut that lets you create a secret without having to base64 encode the secret's data first. When you create aSecret
withstringData
instead ofdata
, Kubernetes will base64 encode all values and replacestringData
withdata
.A simple example:
So long story, short answer: Yes, what you want to do is possible :)