当前位置:网站首页>Kubernetes deploys Loki logging system
Kubernetes deploys Loki logging system
2022-07-02 08:42:00 【freesharer】
loki brief introduction
Loki Is subject to Prometheus Heuristic, horizontally scalable , Highly available multi tenant log aggregation system . It is designed to be very light, efficient and easy to operate . It doesn't index the contents of the log , Instead, set a set of labels for each log stream . A small index and highly compressed blocks simplify the operation , Significantly reduced Loki Cost of .

Loki The architecture of is very simple , Mainly by the following 3 Component composition :
- Loki Is the primary server , Responsible for storing logs and processing queries .
- Promtail Is the agent , Responsible for collecting logs and sending them to Loki .
- Grafana be used for UI Exhibition .
helm install loki
Reference resources :
https://grafana.github.io/loki/charts/
https://grafana.com/docs/loki/latest/installation/helm/
add to helm repo
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
install loki, If you enable persistence, you need to provide it yourself storageclass
helm upgrade --install loki grafana/loki-stack \
--namespace=loki-stack \
--create-namespace \
--set grafana.enabled=true \
--set loki.persistence.enabled=true \
--set loki.persistence.storageClassName=longhorn \
--set loki.persistence.size=5Gi
View the created pods
[[email protected] ~]# kubectl -n loki-stack get pods
NAME READY STATUS RESTARTS AGE
loki-0 1/1 Running 0 28m
loki-grafana-6886db999c-djnhz 1/1 Running 0 28m
loki-promtail-krkxl 1/1 Running 0 28m
loki-promtail-mgdxh 1/1 Running 0 28m
loki-promtail-z7wl2 1/1 Running 0 28m
see service
[[email protected] ~]# kubectl -n loki-stack get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
loki ClusterIP 10.101.148.142 <none> 3100/TCP 29m
loki-grafana NodePort 10.97.174.254 <none> 80:31451/TCP 29m
loki-headless ClusterIP None <none> 3100/TCP 29m
View persistent volumes
[[email protected] ~]# kubectl -n loki-stack get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
storage-loki-0 Bound pvc-854c0d90-266c-41fe-af13-33883b4da5e8 5Gi RWO longhorn 29m
loki Query log
obtain grafana admin User password
kubectl get secret --namespace loki-stack loki-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
modify grafana service The type is nodeport
kubectl -n loki-stack patch svc loki-grafana -p '{"spec": {"type": "NodePort"}}'
Use any node IP+nodePort Sign in loki
http://192.168.0.22:31451
To configure Grafana Loki data source , Default configured 
Switch to Explore Interface 
see pod journal 
Reference resources :
https://anoyi.com/p/474a5034a501
边栏推荐
- ARP and ARP Spoofing
- C language custom types - structure, bit segment (anonymous structure, self reference of structure, memory alignment of structure)
- Service de groupe minecraft
- Benefits of ufcs of D
- Web技术发展史
- 2022 Heilongjiang latest food safety administrator simulation exam questions and answers
- Linux binary installation Oracle database 19C
- Matlab-其它
- Openshift deployment application
- c语言将字符串中的空格替换成%20
猜你喜欢

HCIA—数据链路层

Sentinel easy to use

Detailed explanation of NIN network

【无标题】

How to build the alliance chain? How much is the development of the alliance chain

Gateway is easy to use

Aneng logistics' share price hit a new low: the market value evaporated by nearly 10 billion yuan, and it's useless for chairman Wang Yongjun to increase his holdings
![[blackmail virus data recovery] suffix Rook3 blackmail virus](/img/46/debc848d17767d021f3f41924cccfe.jpg)
[blackmail virus data recovery] suffix Rook3 blackmail virus

sqli-labs第1关

Kubesphere virtualization KSV installation experience
随机推荐
IP协议与IP地址
The best blog to explain the basics of compilation (share)
D interface and domain problems
commands out of sync. did you run multiple statements at once
When a custom exception encounters reflection
Concise analysis of redis source code 11 - Main IO threads and redis 6.0 multi IO threads
ICMP Protocol
gocv图片裁剪并展示
Service de groupe minecraft
sqli-labs第1关
What are the platforms for selling green label domain names? What is the green label domain name like?
16: 00 interview, came out at 16:08, the question is really too
Openshift deployment application
实现双向链表(带傀儡节点)
Aneng logistics' share price hit a new low: the market value evaporated by nearly 10 billion yuan, and it's useless for chairman Wang Yongjun to increase his holdings
Gateway is easy to use
HCIA - application layer
C language replaces spaces in strings with%20
Short video with goods source code, double-click to zoom in when watching the video
Linux安装Oracle Database 19c RAC