Skip to content

Instantly share code, notes, and snippets.

@Sudharma
Created April 12, 2020 11:37
Show Gist options
  • Save Sudharma/51198cfe0b1922422f442ab1d0b99dc5 to your computer and use it in GitHub Desktop.
Save Sudharma/51198cfe0b1922422f442ab1d0b99dc5 to your computer and use it in GitHub Desktop.
EFK configurations via helm values
main:
es:
username: elastic
password: elastic$123
kibana:
encryptionkey: R@nD0mP@SS
# ElasticSearch Configurations
elasticsearch:
protocol: https
extraEnvs:
- name: ELASTIC_PASSWORD
valueFrom:
secretKeyRef:
name: elastic-credentials
key: password
- name: ELASTIC_USERNAME
valueFrom:
secretKeyRef:
name: elastic-credentials
key: username
# Default Resource Limits
resources:
requests:
cpu: "1000m"
memory: "2Gi"
limits:
cpu: "1000m"
memory: "2Gi"
# XPACK enable
esConfig:
elasticsearch.yml: |
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true
xpack.security.transport.ssl.verification_mode: certificate
xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12
xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12
xpack.security.http.ssl.enabled: true
xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12
xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12
xpack.security.transport.ssl.keystore.password: $0meR@nd0mP@ss
xpack.security.transport.ssl.truststore.password: $0meR@nd0mP@ss
xpack.security.http.ssl.keystore.password: $0meR@nd0mP@ss
xpack.security.http.ssl.truststore.password: $0meR@nd0mP@ss
secretMounts:
- name: elastic-certificates
secretName: elastic-certificates
path: /usr/share/elasticsearch/config/certs
# Kibana Configurations
kibana:
elasticsearchHosts: "https://elasticsearch-master:9200"
imageTag: "7.6.2"
imagePullPolicy: "Always"
extraEnvs:
- name: 'ELASTICSEARCH_USERNAME'
valueFrom:
secretKeyRef:
name: elastic-credentials
key: username
- name: 'ELASTICSEARCH_PASSWORD'
valueFrom:
secretKeyRef:
name: elastic-credentials
key: password
- name: 'KIBANA_ENCRYPTION_KEY'
valueFrom:
secretKeyRef:
name: kibana
key: encryptionkey
kibanaConfig:
kibana.yml: |
elasticsearch.ssl:
certificateAuthorities: /usr/share/kibana/config/certs/elasticsearch-ca.pem
verificationMode: certificate
# Elastic CA cert for SSL verify
secretMounts:
- name: elastic-ca
secretName: elastic-ca-pem # Secret Names are hardcoded for simplicity
path: /usr/share/kibana/config/certs
# FluentD Configurations
fluentd:
extraConfigMaps: # Ignoring the logs from kube-system and istio-system
out.conf: |-
<match kubernetes.var.log.containers.**_kube-system_**>
@type null
</match>
<match kubernetes.var.log.containers.**_istio-system_**>
@type null
</match>
<match kubernetes.var.log.containers.**_efk_**>
@type null
</match>
elasticsearch:
host: elasticsearch-master
auth:
enabled: true
user: "elastic" # this is just for testing. Use Kibana user instead
password: "elastic123"
bufferChunkLimit: "2M"
bufferQueueLimit: 8
port: 9200
scheme: "https"
sslVerify: false
@palsonkansakar
Copy link

Can you help me configure this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment