"Helm install prometheus"의 두 판 사이의 차이

 
(같은 사용자의 중간 판 3개는 보이지 않습니다)
5번째 줄: 5번째 줄:
* RELEASE_NAME: prom
* RELEASE_NAME: prom


==설치==
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
40번째 줄: 41번째 줄:
   export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=alertmanager,app.kubernetes.io/instance=prom" -o jsonpath="{.items[0].metadata.name}")
   export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=alertmanager,app.kubernetes.io/instance=prom" -o jsonpath="{.items[0].metadata.name}")
   kubectl --namespace default port-forward $POD_NAME 9093
   kubectl --namespace default port-forward $POD_NAME 9093
#################################################################################
...
######  WARNING: Pod Security Policy has been disabled by default since    #####
######            it deprecated after k8s 1.25+. use                        #####
######            (index .Values "prometheus-node-exporter" "rbac"          #####
###### .          "pspEnabled") with (index .Values                        #####
######            "prometheus-node-exporter" "rbac" "pspAnnotations")      #####
######            in case you still need it.                                #####
#################################################################################
 


The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:
The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:
61번째 줄: 54번째 줄:
https://prometheus.io/
https://prometheus.io/
</syntaxhighlight>
</syntaxhighlight>
==확인==
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
testuser@localhost:~$ helm list
$ helm list -n default
NAME           NAMESPACE      REVISION        UPDATED                                STATUS          CHART                  APP VERSION
NAME   NAMESPACE      REVISION        UPDATED                                STATUS          CHART                  APP VERSION
prometheus      default        1              2023-05-23 09:52:06.308796414 +0000 UTC deployed        prometheus-22.6.2      v2.44.0
prom    default        1              2024-08-12 02:47:21.741740087 +0000 UTC deployed        prometheus-25.26.0      v2.54.0
</syntaxhighlight>
<syntaxhighlight lang='console'>
testuser@localhost:~$ kubectl get pod -l helm.sh/chart=prometheus-22.6.2
NAME                                READY  STATUS    RESTARTS  AGE
prometheus-server-7cb5489967-4cqz4  2/2    Running  0         3m18s
</syntaxhighlight>
<syntaxhighlight lang='console'>
testuser@localhost:~$ kubectl get all | grep prometheus
pod/prometheus-alertmanager-0                            1/1    Running  0              29m
pod/prometheus-kube-state-metrics-6dc44cc4d9-j6pbp      1/1    Running  0              29m
pod/prometheus-prometheus-node-exporter-fqkbj            1/1    Running  0              29m
pod/prometheus-prometheus-node-exporter-gb5lw            1/1    Running  0              29m
pod/prometheus-prometheus-node-exporter-wcjb5            1/1    Running  0              29m
pod/prometheus-prometheus-pushgateway-5fdcccb6f7-b4xk9  1/1    Running  0              29m
pod/prometheus-server-7cb5489967-4cqz4                  2/2    Running  0              29m
service/prometheus-alertmanager              ClusterIP  10.0.14.119  <none>        9093/TCP      29m
service/prometheus-alertmanager-headless     ClusterIP  None          <none>        9093/TCP      29m
service/prometheus-kube-state-metrics        ClusterIP  10.0.7.174    <none>        8080/TCP      29m
service/prometheus-prometheus-node-exporter  ClusterIP  10.0.8.134    <none>        9100/TCP      29m
service/prometheus-prometheus-pushgateway    ClusterIP  10.0.11.113  <none>        9091/TCP      29m
service/prometheus-server                    ClusterIP  10.0.5.175    <none>        80/TCP        29m
daemonset.apps/prometheus-prometheus-node-exporter  3        3        3      3            3          <none>          29m
deployment.apps/prometheus-kube-state-metrics      1/1    1            1          29m
deployment.apps/prometheus-prometheus-pushgateway  1/1    1            1          29m
deployment.apps/prometheus-server                  1/1    1            1          29m
replicaset.apps/prometheus-kube-state-metrics-6dc44cc4d9      1        1        1      29m
replicaset.apps/prometheus-prometheus-pushgateway-5fdcccb6f7  1        1        1      29m
replicaset.apps/prometheus-server-7cb5489967                  1        1        1      29m
statefulset.apps/prometheus-alertmanager  1/1    29m
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
testuser@localhost:~$ kubectl get clusterrole,clusterrolebinding,sa,pvc | grep prometheus
$ kubectl -n default get pods -l "app.kubernetes.io/instance=prom"
clusterrole.rbac.authorization.k8s.io/prometheus-kube-state-metrics                                          2023-05-23T09:52:10Z
NAME                                          READY  STATUS    RESTARTS  AGE
clusterrole.rbac.authorization.k8s.io/prometheus-server                                                      2023-05-23T09:52:10Z
prom-alertmanager-0                            1/1    Running  0          3m7s
clusterrolebinding.rbac.authorization.k8s.io/prometheus-kube-state-metrics                          ClusterRole/prometheus-kube-state-metrics                         31m
prom-kube-state-metrics-579795b97c-dgckf      1/1     Running  0          3m7s
clusterrolebinding.rbac.authorization.k8s.io/prometheus-server                                      ClusterRole/prometheus-server                                      31m
prom-prometheus-node-exporter-dr985            1/1     Running  0          3m7s
serviceaccount/prometheus-alertmanager              1         31m
prom-prometheus-node-exporter-mw968            1/1    Running   0          3m7s
serviceaccount/prometheus-kube-state-metrics        1         31m
prom-prometheus-pushgateway-778cbc4c94-5g7zj  1/1     Running  0          3m7s
serviceaccount/prometheus-prometheus-node-exporter  1        31m
prom-prometheus-server-d654b4667-vr7lh        2/2    Running   0         3m7s
serviceaccount/prometheus-prometheus-pushgateway     1         31m
serviceaccount/prometheus-server                    1         31m
persistentvolumeclaim/prometheus-server                   Bound    pvc-6bef185d-b2c7-41f3-999f-cc2c9c1c7631   8Gi        RWO            pd-standard    31m
persistentvolumeclaim/storage-prometheus-alertmanager-0   Bound    pvc-d2115e4f-c82a-47ef-b4ee-ec9f4426ce28  2Gi        RWO            pd-standard    31m
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang='console'>
<syntaxhighlight lang='console'>
testuser@localhost:~$ kubectl get all -oyaml | grep -oP helm.sh/chart.* | sort | uniq
$ kubectl -n default get all -oyaml | grep -oP helm.sh/chart.* | sort | uniq
helm.sh/chart: alertmanager-0.30.1
helm.sh/chart: alertmanager-1.12.0
helm.sh/chart: kube-state-metrics-4.30.0
helm.sh/chart: kube-state-metrics-5.25.1
helm.sh/chart: prometheus-22.6.2
helm.sh/chart: prometheus-25.26.0
helm.sh/chart: prometheus-node-exporter-4.8.1
helm.sh/chart: prometheus-node-exporter-4.37.1
helm.sh/chart: prometheus-pushgateway-2.0.4
helm.sh/chart: prometheus-pushgateway-2.14.0
</syntaxhighlight>
</syntaxhighlight>



2024년 8월 12일 (월) 11:54 기준 최신판

1 개요[ | ]

helm install prometheus
  • namespace: default
  • RELEASE_NAME: prom

2 설치[ | ]

$ helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
"prometheus-community" has been added to your repositories
$ helm repo update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "prometheus-community" chart repository
Update Complete. ⎈Happy Helming!⎈
$ helm install prom prometheus-community/prometheus
NAME: prom
LAST DEPLOYED: Mon Aug 12 02:47:21 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
TEST SUITE: None
NOTES:
The Prometheus server can be accessed via port 80 on the following DNS name from within your cluster:
prom-prometheus-server.default.svc.cluster.local


Get the Prometheus server URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=prometheus,app.kubernetes.io/instance=prom" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace default port-forward $POD_NAME 9090


The Prometheus alertmanager can be accessed via port 9093 on the following DNS name from within your cluster:
prom-alertmanager.default.svc.cluster.local


Get the Alertmanager URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace default -l "app.kubernetes.io/name=alertmanager,app.kubernetes.io/instance=prom" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace default port-forward $POD_NAME 9093
...

The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:
prom-prometheus-pushgateway.default.svc.cluster.local


Get the PushGateway URL by running these commands in the same shell:
  export POD_NAME=$(kubectl get pods --namespace default -l "app=prometheus-pushgateway,component=pushgateway" -o jsonpath="{.items[0].metadata.name}")
  kubectl --namespace default port-forward $POD_NAME 9091

For more information on running Prometheus, visit:
https://prometheus.io/

3 확인[ | ]

$ helm list -n default
NAME    NAMESPACE       REVISION        UPDATED                                 STATUS          CHART                   APP VERSION
prom    default         1               2024-08-12 02:47:21.741740087 +0000 UTC deployed        prometheus-25.26.0      v2.54.0
$ kubectl -n default get pods -l "app.kubernetes.io/instance=prom"
NAME                                           READY   STATUS    RESTARTS   AGE
prom-alertmanager-0                            1/1     Running   0          3m7s
prom-kube-state-metrics-579795b97c-dgckf       1/1     Running   0          3m7s
prom-prometheus-node-exporter-dr985            1/1     Running   0          3m7s
prom-prometheus-node-exporter-mw968            1/1     Running   0          3m7s
prom-prometheus-pushgateway-778cbc4c94-5g7zj   1/1     Running   0          3m7s
prom-prometheus-server-d654b4667-vr7lh         2/2     Running   0          3m7s
$ kubectl -n default get all -oyaml | grep -oP helm.sh/chart.* | sort | uniq
helm.sh/chart: alertmanager-1.12.0
helm.sh/chart: kube-state-metrics-5.25.1
helm.sh/chart: prometheus-25.26.0
helm.sh/chart: prometheus-node-exporter-4.37.1
helm.sh/chart: prometheus-pushgateway-2.14.0

4 같이 보기[ | ]

5 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}