NOTES.txt 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. {{- if .Values.server.enabled -}}
  2. The Prometheus server can be accessed via port {{ .Values.server.service.servicePort }} on the following DNS name from within your cluster:
  3. {{ template "prometheus.server.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
  4. {{ if .Values.server.ingress.enabled -}}
  5. From outside the cluster, the server URL(s) are:
  6. {{- range .Values.server.ingress.hosts }}
  7. http://{{ . }}
  8. {{- end }}
  9. {{- else }}
  10. Get the Prometheus server URL by running these commands in the same shell:
  11. {{- if contains "NodePort" .Values.server.service.type }}
  12. export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.server.fullname" . }})
  13. export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  14. echo http://$NODE_IP:$NODE_PORT
  15. {{- else if contains "LoadBalancer" .Values.server.service.type }}
  16. NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  17. You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.server.fullname" . }}'
  18. export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.server.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
  19. echo http://$SERVICE_IP:{{ .Values.server.service.servicePort }}
  20. {{- else if contains "ClusterIP" .Values.server.service.type }}
  21. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.server.name }}" -o jsonpath="{.items[0].metadata.name}")
  22. kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9090
  23. {{- end }}
  24. {{- end }}
  25. {{- if .Values.server.persistentVolume.enabled }}
  26. {{- else }}
  27. #################################################################################
  28. ###### WARNING: Persistence is disabled!!! You will lose your data when #####
  29. ###### the Server pod is terminated. #####
  30. #################################################################################
  31. {{- end }}
  32. {{- end }}
  33. {{ if .Values.alertmanager.enabled }}
  34. The Prometheus alertmanager can be accessed via port {{ .Values.alertmanager.service.servicePort }} on the following DNS name from within your cluster:
  35. {{ template "prometheus.alertmanager.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
  36. {{ if .Values.alertmanager.ingress.enabled -}}
  37. From outside the cluster, the alertmanager URL(s) are:
  38. {{- range .Values.alertmanager.ingress.hosts }}
  39. http://{{ . }}
  40. {{- end }}
  41. {{- else }}
  42. Get the Alertmanager URL by running these commands in the same shell:
  43. {{- if contains "NodePort" .Values.alertmanager.service.type }}
  44. export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.alertmanager.fullname" . }})
  45. export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  46. echo http://$NODE_IP:$NODE_PORT
  47. {{- else if contains "LoadBalancer" .Values.alertmanager.service.type }}
  48. NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  49. You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.alertmanager.fullname" . }}'
  50. export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.alertmanager.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
  51. echo http://$SERVICE_IP:{{ .Values.alertmanager.service.servicePort }}
  52. {{- else if contains "ClusterIP" .Values.alertmanager.service.type }}
  53. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.alertmanager.name }}" -o jsonpath="{.items[0].metadata.name}")
  54. kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9093
  55. {{- end }}
  56. {{- end }}
  57. {{- if .Values.alertmanager.persistentVolume.enabled }}
  58. {{- else }}
  59. #################################################################################
  60. ###### WARNING: Persistence is disabled!!! You will lose your data when #####
  61. ###### the AlertManager pod is terminated. #####
  62. #################################################################################
  63. {{- end }}
  64. {{- end }}
  65. {{- if .Values.nodeExporter.podSecurityPolicy.enabled }}
  66. {{- else }}
  67. #################################################################################
  68. ###### WARNING: Pod Security Policy has been moved to a global property. #####
  69. ###### use .Values.podSecurityPolicy.enabled with pod-based #####
  70. ###### annotations #####
  71. ###### (e.g. .Values.nodeExporter.podSecurityPolicy.annotations) #####
  72. #################################################################################
  73. {{- end }}
  74. {{ if .Values.pushgateway.enabled }}
  75. The Prometheus PushGateway can be accessed via port {{ .Values.pushgateway.service.servicePort }} on the following DNS name from within your cluster:
  76. {{ template "prometheus.pushgateway.fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local
  77. {{ if .Values.pushgateway.ingress.enabled -}}
  78. From outside the cluster, the pushgateway URL(s) are:
  79. {{- range .Values.pushgateway.ingress.hosts }}
  80. http://{{ . }}
  81. {{- end }}
  82. {{- else }}
  83. Get the PushGateway URL by running these commands in the same shell:
  84. {{- if contains "NodePort" .Values.pushgateway.service.type }}
  85. export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "prometheus.pushgateway.fullname" . }})
  86. export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
  87. echo http://$NODE_IP:$NODE_PORT
  88. {{- else if contains "LoadBalancer" .Values.pushgateway.service.type }}
  89. NOTE: It may take a few minutes for the LoadBalancer IP to be available.
  90. You can watch the status of by running 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "prometheus.pushgateway.fullname" . }}'
  91. export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "prometheus.pushgateway.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
  92. echo http://$SERVICE_IP:{{ .Values.pushgateway.service.servicePort }}
  93. {{- else if contains "ClusterIP" .Values.pushgateway.service.type }}
  94. export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "prometheus.name" . }},component={{ .Values.pushgateway.name }}" -o jsonpath="{.items[0].metadata.name}")
  95. kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 9091
  96. {{- end }}
  97. {{- end }}
  98. {{- end }}
  99. For more information on running Prometheus, visit:
  100. https://prometheus.io/