github.com/alibaba/sealer@v0.8.6-0.20220430115802-37a2bdaa8173/applications/kube-prometheus-stack/README.md (about) 1 # Overview 2 3 This image base on longhorn:v1.2.3 as its persistence storage engine. 4 5 Components included in this image: 6 7 - 1 DaemonSet for promtail. 8 - 1 DaemonSet for node-exporter. 9 - 1 StatefulSet replica for loki server which requests "50Gi" storage. 10 - 1 Deployment replica for grafana. 11 - 1 Deployment replica for kube-state-metrics. 12 - 1 Deployment replica for alertmanager. 13 - 1 Deployment replica for pushgateway. 14 - 1 Deployment replica for prometheus-server. 15 16 ## How to use it 17 18 ### Browser the dashboard 19 20 - 1 Prometheus, Grafana, and Alertmanager dashboards can be accessed quickly using kubectl port-forward after running the quickstart via the commands below. 21 22 - 1 Prometheus 23 24 ``` 25 kubectl --namespace kube-prometheus-stack port-forward svc/kube-prometheus-stack-prometheus 9090 26 ``` 27 28 Then access via [http://localhost:9090](http://localhost:9090/) 29 30 Grafana 31 32 ``` 33 kubectl --namespace kube-prometheus-stack port-forward svc/kube-prometheus-stack-grafana 3000 34 ``` 35 36 Then access via [http://localhost:3000](http://localhost:3000/) and use the default grafana user:password of `admin:admin`. 37 38 Alert Manager 39 40 ``` 41 kubectl --namespace kube-prometheus-stack port-forward svc/kube-prometheus-stack-alertmanager 9093 42 ``` 43 44 Then access via [http://localhost:9093](http://localhost:9093/) 45 46 ``` 47 kubectl --namespace kube-prometheus-stack port-forward service/kube-prometheus-stack-grafana 80 48 ``` 49 50 #### Get the user-name and password 51 52 - 1 you should be required to input username and password when you access to the dashboard. 53 54 - 1 you can get the username with these command. 55 56 ```shell 57 kubectl get secret -n fluentbit-loki-stack-system fluentbit-loki-stack-grafana -o jsonpath="{.data.admin-user}" | base64 --decode ; echo 58 kubectl get secret -n fluentbit-loki-stack-system fluentbit-loki-stack-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo 59 ``` 60 61 ## How to rebuild it use helm 62 63 ```shell 64 helm repo add prometheus-community https://prometheus-community.github.io/helm-charts 65 helm repo update 66 helm install kube-prometheus-stack prometheus-community/kube-prometheus-stack \ 67 --namespace kube-prometheus-stack --create-namespace \ 68 --set prometheus.alertmanager.persistentVolume.enabled=false \ 69 --set prometheus.server.persistentVolume.enabled=false 70 ``` 71 72 run below command to build it 73 74 ```shell 75 sealer build -t {Your Image Name} -f Kubefile -m cloud . 76 ``` 77 78 More parameters see [official document here](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack).