[Cloude] Monitoring & Logging

MeltingOlafยท2022๋…„ 5์›” 27์ผ
0

[Cloud]

๋ชฉ๋ก ๋ณด๊ธฐ
23/25

โœ”๏ธ Monitoring & Logging

โœ”๏ธ Prometheus Monitoring

$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
$ helm update

prom-value.yaml

grafana:
  service:
    type: LoadBalancer
$ kubectl create ns monitor
$ helm install prom prometheus-community/kube-prometheus-stack -f prom-value.yaml -n monitor

โœ”๏ธEFK Logging

ELK Stack: Elasticsearch + Logstash + Kibana
EFK Stack: Elasticsearch + Fluentd + Kibana
Elasticsearch + Fluent Bit + Kibana
Elastic Stack: Elasticsearch + Beat + Kibana

โœ”๏ธ Elasticsearch

$ helm repo add elastic https://helm.elastic.co
$ helm repo update
$ helm show values elastic/elasticsearch > es-value.yaml

es-value.yaml

 18 replicas: 1
 19 minimumMasterNodes: 1
 
 80 resources:
 81   requests:
 82     cpu: "500m"
 83     memory: "1Gi"
 84   limits:
 85     cpu: "500m"
 86     memory: "1Gi"
$ kubectl create ns logging
$ helm install elastic elastic/elasticsearch -f es-value.yaml -n logging

โœ”๏ธ Fluent Bit

https://github.com/fluent/fluent-bit-kubernetes-logging

$ git clone https://github.com/fluent/fluent-bit-kubernetes-logging.git
$ cd  fluent-bit-kubernetes-logging
$ kubectl create -f fluent-bit-service-account.yaml
$ kubectl create -f fluent-bit-role-1.22.yaml
$ kubectl create -f fluent-bit-role-binding-1.22.yaml
$ kubectl create -f output/elasticsearch/fluent-bit-configmap.yaml

output/elasticsearch/fluent-bit-ds.yaml

 32         - name: FLUENT_ELASTICSEARCH_HOST
 33           value: "elasticsearch-master"
$ kubectl create -f output/elasticsearch/fluent-bit-ds.yaml

โœ”๏ธ Kibana

$ helm show values elastic/kibana > kibana-value.yaml

kibana-value.yaml

 49 resources:
 50   requests:
 51     cpu: "500m"
 52     memory: "1Gi"
 53   limits:
 54     cpu: "500m"
 55     memory: "1Gi"
 
119 service:
120   type: LoadBalancer
$ helm install kibana elastic/kibana -f kibana-value.yaml -n logging

http://192.168.100.X:5601

profile
How R U Today :)

0๊ฐœ์˜ ๋Œ“๊ธ€