Prometheus Operations: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
Prometheus comes with a built-in [[Prometheus_Concepts#Prometheus_Console|console]]. When Prometheus is deployed in Kubernetes and on some Kubernetes instances, such as Docker Desktop Kubernetes, access to console must be enabled explicitly by deploying a LoadBalancer service: | Prometheus comes with a built-in [[Prometheus_Concepts#Prometheus_Console|console]]. When Prometheus is deployed in Kubernetes and on some Kubernetes instances, such as Docker Desktop Kubernetes, access to console must be enabled explicitly by deploying a LoadBalancer service: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
namespace=" | namespace="prom" | ||
cat <<EOF | kubectl -n ${namespace} -f - | cat <<EOF | kubectl -n ${namespace} -f - | ||
apiVersion: v1 | apiVersion: v1 |
Revision as of 05:23, 16 October 2020
Internal
Installation
Installation with Helm
Installation with Prometheus Operator
Expose Prometheus Console in Kubernetes
Prometheus comes with a built-in console. When Prometheus is deployed in Kubernetes and on some Kubernetes instances, such as Docker Desktop Kubernetes, access to console must be enabled explicitly by deploying a LoadBalancer service:
namespace="prom"
cat <<EOF | kubectl -n ${namespace} -f -
apiVersion: v1
kind: Service
metadata:
annotations:
meta.helm.sh/release-name: prometheus
meta.helm.sh/release-namespace: prometheus
labels:
app: kube-prometheus-stack-operator
app.kubernetes.io/managed-by: Helm
chart: kube-prometheus-stack-10.1.0
heritage: Helm
release: prometheus
name: prometheus-kube-prometheus-prometheus-lb
namespace: prometheus
spec:
type: LoadBalancer
ports:
- name: http
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: prometheus
prometheus: prometheus-kube-prometheus-prometheus
EOF