Prometheus Operations
Jump to navigation
Jump to search
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. This works for Docker Desktop Kubernetes, for another environment, expose the service accordingly.
namespace="prom"
cat <<EOF | kubectl -n ${namespace} apply -f -
apiVersion: v1
kind: Service
metadata:
name: prometheus-kube-prometheus-prometheus-lb
namespace: ${namespace}
spec:
type: LoadBalancer
ports:
- name: http
port: 9090
protocol: TCP
targetPort: 9090
selector:
app: prometheus
prometheus: prometheus-kube-prometheus-prometheus
EOF
Test with http://localhost:9090/