内容目录
My Elasticsearch is deployed on a single machine, so to connect Kubernetes Fluentd to Elasticsearch, I need to modify some configuration items.
First, install Fluentd on Kubernetes.
Download the YAML template repository:
git clone https://github.com/fluent/fluentd-kubernetes-daemonset
Modify the fluentd-daemonset-elasticsearch-rbac.yaml
file, replacing
env:
- name: FLUENT_ELASTICSEARCH_HOST
value: "elasticsearch-logging"
- name: FLUENT_ELASTICSEARCH_PORT
value: "9200"
- name: FLUENT_ELASTICSEARCH_SCHEME
value: "http"
# Option to configure elasticsearch plugin with self signed certs
# ================================================================
- name: FLUENT_ELASTICSEARCH_SSL_VERIFY
value: "true"
# Option to configure elasticsearch plugin with tls
# ================================================================
- name: FLUENT_ELASTICSEARCH_SSL_VERSION
value: "TLSv1_2"
# X-Pack Authentication
# =====================
- name: FLUENT_ELASTICSEARCH_USER
value: "elastic"
- name: FLUENT_ELASTICSEARCH_PASSWORD
value: "changeme"
elasticsearch-logging is the address of Elasticsearch.
Then apply the YAML file directly.
文章评论