当前位置:网站首页>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
边栏推荐
- Minecraft群組服開服
- 群辉 NAS 配置 iSCSI 存储
- Makefile基本原理
- [blackmail virus data recovery] suffix Hydra blackmail virus
- gocv边界填充
- Judge whether it is Sudoku
- 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
- 【无标题】
- ICMP Protocol
- Programming ape learning English - imperative programming
猜你喜欢
![[blackmail virus data recovery] suffix Rook3 blackmail virus](/img/46/debc848d17767d021f3f41924cccfe.jpg)
[blackmail virus data recovery] suffix Rook3 blackmail virus

什么是SQL注入

ARP and ARP Spoofing

Analysis of the use of comparable, comparator and clonable interfaces

Don't know mock test yet? An article to familiarize you with mock

Sqli labs level 8 (Boolean blind note)

sqli-labs第12关

Minecraft模组服开服

Linux二进制安装Oracle Database 19c

Linux binary installation Oracle database 19C
随机推荐
什么是SQL注入
sqli-labs第2关
Dip1000 runaway
Tcp/ip - transport layer
Minecraft群组服开服
Driving test Baodian and its spokesperson Huang Bo appeared together to call for safe and civilized travel
Viewing JS array through V8
Use Wireshark to grab TCP three handshakes
kubernetes部署loki日志系统
k8s入门:Helm 构建 MySQL
How to apply for a secondary domain name?
[blackmail virus data recovery] suffix Hydra blackmail virus
旋转链表(图解说明)
Concise analysis of redis source code 11 - Main IO threads and redis 6.0 multi IO threads
Linked list classic interview questions (reverse the linked list, middle node, penultimate node, merge and split the linked list, and delete duplicate nodes)
Jz-061-serialized binary tree
Zipkin is easy to use
HackTheBox-Gunship
Detailed explanation of NIN network
HCIA - application layer