Deploy Prometheus Monitoring Stack
You can deploy a dedicated Kubernetes cluster to serve as a centralized monitoring stack for clusters deployed through Palette. The monitoring stack uses the open source tool Prometheus to collect, aggregate, and store metrics forwarded from all other clusters in your environment.
The monitoring stack uses a server-client architecture. The server uses the Prometheus Operator pack to deploy Prometheus and its dependencies. It exposes an API endpoint that Kubernetes clusters with the Prometheus Agent pack use to forward metrics. When authentication is enabled, the Traefik pack provides ingress with Transport Layer Security (TLS) termination and basic authentication for the Prometheus endpoint.
Use the following steps to deploy a monitoring stack, and learn how to configure a host cluster to forward metrics to the monitoring stack.
We recommend you avoid installing applications in your monitoring stack. The monitoring stack requires all allocated resources to support Prometheus and incoming metrics from all other clusters.
Deploy a Monitoring Stack
Use the following steps to deploy a new host cluster with the Prometheus Operator pack. You can add the Prometheus Operator pack to an existing cluster if you already have a host cluster deployed in your environment.
The Prometheus Operator pack installs an unsecured Prometheus server by default. You can choose to deploy the monitoring stack with or without authentication.
Without Authentication
Prerequisites
-
An infrastructure provider environment registered in Palette. Refer to the Clusters documentation for guidance on how to register your infrastructure provider environment in Palette.
-
The minimum required size for the Prometheus server is 4 CPUs, 8 GB of memory, and 10 GB of storage. We recommend the monitoring stack have 1.5x to 2x the minimum required size. For example:
- 8 CPUs
- 16 GB of memory
- 20 GB of storage
As new clusters with the Prometheus agent are added to your environment, review the resource utilization and consider increasing resources if needed. Each additional agent requires the following resources from the monitoring stack:
- 0.1 CPUs
- 250 MiB of memory
- 1 GB of storage
Refer to the Prometheus Operational aspects documentation for additional guidance.
Create Profile and Deploy Cluster
-
Log in to Palette.
-
From the left main menu, select Profiles.
-
Select Add Cluster Profile to create a new cluster profile.
-
Enter a unique cluster profile Name and choose Full for the cluster profile Type. Select Next.
-
Choose the applicable Infrastructure provider or Managed Kubernetes service and select Next.
-
Select the desired OS, Kubernetes distribution, Container Network Interface (CNI), and Container Storage Interface (CSI). Click Next layer after each selection. When you have finished building your cluster's core infrastructure, select Confirm.
-
On the Profile Layers screen, select Add New Pack.
-
Use the following information to find the Prometheus Grafana pack.
- Pack Type: Monitoring
- Registry: Public Repo
- Pack Name: Prometheus Grafana
- Pack Version: 44.3.X or later
-
Next, select Values and expand the Presets drawer.
-
Under Remote Monitoring, select Enable.
-
Review the YAML configuration. Locate the parameter
grafana.adminPassword, and enter a password for the defaultadminuser.charts:
kube-prometheus-stack:
grafana:
adminPassword: "YourPassword"
podLabels:
spectrocloud.com/connection: proxy -
Confirm your changes by selecting Confirm & Create. You can enable several options to expand the functionality of the monitoring stack. Review the Prometheus Operator pack documentation to learn more about the available options.
-
Select Add New Pack.
-
Use the following information to find the Spectro Cluster Metrics pack.
- Pack Type: Monitoring
- Registry: Public Repo
- Pack Name: Spectro Cluster Metrics
- Pack Version: 3.3.X or later
-
Use the default values. Select Confirm & Create.
-
Select Add New Pack.
-
Use the following information to find the Spectro Grafana Dashboards pack.
- Pack Type: Monitoring
- Registry: Public Repo
- Pack Name: Spectro Grafana Dashboards
- Pack Version: 1.0.X or later
-
Use the default values. Select Confirm & Create.
-
Select Next to review your cluster profile stack. If no changes are needed, select Finish Configuration.
-
From the left main menu, select Clusters > Add New Cluster, and proceed through the cluster creation process. The cluster infrastructure must match the type selected when creating the cluster profile for your monitoring stack.
For additional information, refer to the cluster deployment guide for your applicable infrastructure environment.
Public Cloud (IaaS) Public Cloud (Managed) Data Center Edge AWS IaaS EKS Apache CloudStack Edge Native Azure IaaS AKS MAAS - GCP IaaS GKE MAAS LXD - - - Nutanix - - - VMware vSphere -
Once the cluster is deployed, navigate to the left main menu and select Clusters. Select your cluster and ensure its status is Running and ready to receive information from Prometheus agents.
Validate
To validate the monitoring stack is successfully deployed and ready to receive Prometheus agent requests, use the following steps.
-
Log in to Palette.
-
From the left main menu, select Clusters.
-
Select the monitoring stack cluster. Ensure the cluster is in Running state.
-
Click on the exposed service URL for the service
prometheus-operator-kube-prometheus-stack-grafana.
-
Log in to the Grafana dashboard using the user
adminand the password you specified in the cluster profile.
With Authentication and Encryption
To enable Hypertext Transfer Protocol Secure (HTTPS), you must make several architectural decisions and decide on various options for setting up the environment. These options range from choosing what will generate the Secure Socket Layer (SSL) certificates to how incoming requests for Grafana or Prometheus are handled.
The approach presented in this guide is one pattern you can use. However, we encourage you to discuss this pattern with your system administrator or platform engineering team before changing your infrastructure and Domain Name System (DNS) resources.
The following diagram represents the infrastructure pattern you will use in this guide to enable HTTPS.

In this guide, the following domains are used to expose the monitoring stack.
| Domain | Description |
|---|---|
metrics.example.com | The endpoint that all host clusters forward Prometheus metrics to. |
monitoring.example.com | The Grafana dashboard. |
Prerequisites
-
Ability to create and update DNS record names. Two custom domain names are needed: one for the Grafana dashboard, and another for workload clusters to forward metrics to the monitoring stack.
-
Ability to create a public certificate for each domain.
-
An infrastructure provider environment registered in Palette. Refer to the Clusters documentation for guidance on how to register your infrastructure provider environment in Palette.
-
htpasswd or similar basic auth password file generator tool.
-
The minimum required size for the Prometheus server is 4 CPUs, 8 GB of memory, and 10 GB of storage. We recommend the monitoring stack have 1.5x to 2x the minimum required size. For example:
- 8 CPUs
- 16 GB of memory
- 20 GB of storage
As new clusters with the Prometheus agent are added to your environment, review the resource utilization and consider increasing resources if needed. Each additional agent requires the following resources from the monitoring stack:
- 0.1 CPUs
- 250 MiB of memory
- 1 GB of storage
Refer to the Prometheus Operational aspects documentation for additional guidance.
Create Profile and Deploy Cluster
-
Log in to Palette.
-
From the left main menu, select Profiles.
-
Select Add Cluster Profile to create a new cluster profile.
-
Enter a unique cluster profile Name and choose Full for the cluster profile Type. Select Next.
-
Choose the applicable Infrastructure provider or Managed Kubernetes service and select Next.
-
Select the desired OS, Kubernetes distribution, Container Network Interface (CNI), and Container Storage Interface (CSI). Click Next layer after each selection. When you have finished building your cluster's core infrastructure, select Confirm.
-
On the Profile Layers screen, select Add New Pack.
-
Use the following information to add the Traefik ingress controller pack.
- Pack Type: Ingress
- Registry: Public Repo
- Pack Name: Traefik
- Pack Version: 39.0.X or later
-
Use the default values. Select Confirm & Create.
-
Select Add New Pack.
-
Use the following information to find the Prometheus Grafana pack.
- Pack Type: Monitoring
- Registry: Public Repo
- Pack Name: Prometheus Grafana
- Pack Version: 44.3.X or later
-
Next, select Values and expand the Presets drawer.
-
Under Remote Monitoring, select Enable.
-
Review the YAML configuration. Locate the parameter
grafana.adminPassword, and enter a password for the defaultadminuser.charts:
kube-prometheus-stack:
grafana:
adminPassword: "YourPassword"
podLabels:
spectrocloud.com/connection: proxy -
Locate the
prometheus.ingresssection. Update the ingress configuration with the values provided below. Replace thehostsparameter with your custom domain.charts:
kube-prometheus-stack:
prometheus:
ingress:
enabled: true
ingressClassName: "traefik"
annotations:
{
traefik.ingress.kubernetes.io/router.middlewares: monitoring-basic-auth@kubernetescrd,
traefik.ingress.kubernetes.io/router.entrypoints: websecure,
traefik.ingress.kubernetes.io/router.tls: "true",
}
hosts: [metrics.example.com] -
Next, update the
prometheus.service.typeparameter toClusterIP.charts:
kube-prometheus-stack:
prometheus:
service:
type: ClusterIP
- Confirm your changes by selecting Confirm & Create. You can enable several options to expand the functionality of the monitoring stack. Review the Prometheus Operator pack documentation to learn more about the available options.
-
Select Add New Pack.
-
Use the following information to find the Spectro Cluster Metrics pack.
- Pack Type: Monitoring
- Registry: Public Repo
- Pack Name: Spectro Cluster Metrics
- Pack Version: 3.3.X or later
-
Use the default values. Select Confirm & Create.
-
Select Add New Pack.
-
Use the following information to find the Spectro Grafana Dashboards pack.
- Pack Type: Monitoring
- Registry: Public Repo
- Pack Name: Spectro Grafana Dashboards
- Pack Version: 1.0.X or later
-
Use the default values. Select Confirm & Create.
-
Select Next to review your cluster profile stack. If no changes are needed, select Finish Configuration.
-
From the left main menu, select Clusters > Add New Cluster, and proceed through the cluster creation process. The cluster infrastructure must match the type selected when creating the cluster profile for your monitoring stack.
For additional information, refer to the cluster deployment guide for your applicable infrastructure environment.
Public Cloud (IaaS) Public Cloud (Managed) Data Center Edge AWS IaaS EKS Apache CloudStack Edge Native Azure IaaS AKS MAAS - GCP IaaS GKE MAAS LXD - - - Nutanix - - - VMware vSphere -
Once the cluster is deployed, navigate to the left main menu and select Clusters. Select your cluster and ensure its status is Running.
-
Download the cluster's Kubeconfig File. Refer to Access Cluster with CLI for additional guidance.
-
Open a terminal session and set the variable
KUBECONFIGto point to kubeconfig file you downloaded.export KUBECONFIG=<path-to-kubeconfig> -
Create an
htpasswdfile for the useragentand assign a password. You can choose a different username if you prefer.htpasswd -c auth agentExample outputNew password: <agent-password>
Re-type new password:
Adding password for user agent -
Convert the
htpasswdfile into a Kubernetes secret. If you created a user other thanagent, update the value for the--from-fileflag.kubectl create secret generic basic-auth --from-file=auth --namespace monitoringExample outputsecret/basic-auth created -
Create a Traefik Middleware resource for basic authentication. This resource references the
basic-authsecret created in the previous step.cat <<EOF | kubectl apply --namespace monitoring --filename -
apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: basic-auth
namespace: monitoring
spec:
basicAuth:
secret: basic-auth
EOFExample outputmiddleware.traefik.io/basic-auth createdwarningThe following steps can be complex, depending on your environment and your access. Discuss the remaining steps with your network administrator team if you need additional guidance.
-
Create a Canonical Name (CNAME) record for each of the following services and add the load balancer hostname to the CNAME record value.
Use the following commands to retrieve the load balancer hostname for each service.
Prometheus Grafanakubectl get service prometheus-operator-kube-prometheus-stack-grafana --namespace monitoring --output jsonpath='{.status.loadBalancer.ingress[0].hostname}'Traefikkubectl get service traefik --namespace traefik --output jsonpath='{.status.loadBalancer.ingress[0].hostname}'Use the following table to identify which mapping to use between the domain and each load balancer hostname.
Service Domain CNAME Example Value prometheus-operator-kube-prometheus-stack-grafanamonitoring.example.coma702f8a14b9684a30b18b875d2cca997-1676466159.us-east-1.elb.amazonaws.comtraefikmetrics.example.coma57b622a0c0a148189ed00df614481c9-1803006767.us-east-1.elb.amazonaws.com -
Create a public certificate for each domain. If you are using a public cloud provider, use the native certificate manager service to generate a public certificate that you can attach to the load balancers with minimal overhead. For on-premises environments, use the default certificate manager used by your organization.
-
Wait for the DNS changes to propagate. This may take several minutes.
Validate
To validate the monitoring stack is successfully deployed and ready to receive Prometheus agent requests, use the following steps.
-
Log in to Palette.
-
From the left main menu, select Clusters.
-
Select the monitoring stack cluster. Ensure the cluster is in Running state.
-
Open your web browser and visit the domain name you specified for the Grafana dashboard. For example:
https://monitoring.example.com. -
Log in to the Grafana dashboard using the user
adminand the password you specified in the cluster profile. -
After you have verified you can log in to the Grafana dashboard, open a new tab and visit the Prometheus endpoint. For example:
https://metrics.example.com. -
Log in with the user
agentand use the password you specified in thehtpasswdfile.
Next Steps
Now that you have a monitoring stack deployed and available in your environment, start adding the Prometheus agent to new and existing clusters. Check out Enable Monitoring on Host Cluster to get started.