I use the elasticsearch secret function in the kubernetes environment.
There is a problem with the distribution of certificates used at this time.
I use a .p12 format certificate, which Elasticsearch uses by default. For use https, all PODs need to use Kubernetes secrets to share certificates.
But,
kubectl create secret generic db-user-pass --from-file=./username.txt --from-file=./password.txt
I can not use the command like above, and I need to generate secrets with a .yaml file.
However, if I create a .yaml file, it will not be base64 encoded. How can I solve it?
Finally, I want to know how to write .yaml ? The example below does not work. https://kubernetes.io/docs/concepts/configuration/secret/
apiVersion: v1
kind: Secret
metadata:
labels:
name: my-certificates
namespace: nms
type: Opaque
files:
- my-file