How to set secret files to kubernetes secrets by yaml?
问题 I want to store files in Kubernetes Secrets but I haven't found how to do it using a yaml file. I've been able to make it using the cli with kubectl : kubectl create secret generic some-secret --from-file=secret1.txt=secrets/secret1.txt But when I try something similar in a yaml : apiVersion: v1 kind: Secret metadata: name: some-secret type: Opaque data: secret1.txt: secrets/secret1.txt I´ve got this error: [pos 73]: json: error decoding base64 binary 'assets/elasticsearch.yml': illegal