Skip to content

Commit 8598d8c

Browse files
committed
Update readme.MD
添加步骤
1 parent 5cf8bfa commit 8598d8c

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

module10/loki-stack/readme.MD

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,37 @@ Error: unable to build kubernetes objects from release manifest: [unable to reco
1313
### download loki-stack
1414
```
1515
helm pull grafana/loki-stack
16-
tar -xvf loki-stack-2.4.1.tgz
16+
tar -xvf loki-stack-*.tgz
1717
```
1818
```
1919
cd loki-stack
2020
```
2121
### replace all `rbac.authorization.k8s.io/v1beta1` with `rbac.authorization.k8s.io/v1` by
2222
```
2323
sed -i s#rbac.authorization.k8s.io/v1beta1#rbac.authorization.k8s.io/v1#g *.yaml
24+
25+
sed -i s#rbac.authorization.k8s.io/v1beta1#rbac.authorization.k8s.io/v1#g `grep -rl "rbac.authorization.k8s.io/v1beta1" ./loki-stack/ `
2426
```
2527
### install loki locally
2628
```
2729
helm upgrade --install loki ./loki-stack --set grafana.enabled=true,prometheus.enabled=true,prometheus.alertmanager.persistentVolume.enabled=false,prometheus.server.persistentVolume.enabled=false
2830
```
2931
### change the grafana service to NodePort type and access it
32+
```
33+
kubectl edit svc loki-grafana -oyaml -n default
34+
change ClusterIP type to NodePort
35+
```
3036
login password is in secret `loki-grafana`
37+
```
38+
kubectl get secret loki-grafana -oyaml -n default
39+
```
40+
find admin-password: xxx
41+
```
42+
echo 'xxx' | base64 -d
43+
```
44+
then you will get grafana login password, the login username is 'admin' on default.
45+
46+
note: the xxx is value of key admin-password in your yaml.
47+
3148
###
3249

0 commit comments

Comments
 (0)