内容目录
我的 Elasticsearch 是单机部署的,因此要将 kubernetes Fluentd 接入 Elasticsearch,需要改点配置项。
首先是在 kubernetes 上安装 Fluentd。
下载 yaml 模板仓库:
git clone https://github.com/fluent/fluentd-kubernetes-daemonset
修改 fluentd-daemonset-elasticsearch-rbac.yaml
文件,替换
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 是 es 的地址。
然后直接应用 yaml 文件即可。
文章评论