May 2019
Intermediate to advanced
442 pages
11h 36m
English
With our new namespace available, it's time to create a very simple Prometheus configuration and save it on a ConfigMap using the following manifest:
apiVersion: v1kind: ConfigMapmetadata: name: prometheus-config namespace: monitoring data: prometheus.yml: | scrape_configs: - job_name: prometheus static_configs: - targets: - localhost:9090
Apply the previous manifest using the following command:
kubectl apply -f prometheus-configmap.yaml
Now, it's time to start a new deployment of Prometheus, making sure we mount the previously configured ConfigMap into the pod we are deploying. The Deployment object is configured with the following metadata:
apiVersion: apps/v1kind: Deploymentmetadata: name: prometheus-deployment ...
Read now
Unlock full access