I have a generated kubernetes secret like this as it is shown e.g. in argocd:
apiVersion: v1
data:
ES_GUEST_PASSWORD: ++++++++
ES_GUEST_USERNAME: ++++++++
kind: Secret
I now want to use it as an input to a username and password setting for Kibana. I know how to do it with env variables inside a container section but how do I do it outside a container?
In my case it is e.g. the configuration of the Elasticsearch/Kibana ECK Operator configuration:
apiVersion: kibana.k8s.elastic.co/v1
kind: Kibana
metadata:
name: kibana
spec:
version: 8.11.1
count: 2
elasticsearchRef:
name: elasticsearch
config:
xpack.security.authc.providers:
anonymous.anonymous1:
order: 0
credentials:
username: ES_GUEST_USERNAME
password: ES_GUEST_PASSWORD
basic.basic1:
order: 1
In this case ES_GUEST_USERNAME and ES_GUEST_PASSWORD are just used as plain text and not replaced.