DigitalOcean Metrics is actually a pull-based system, not push.

Let’s see it in action. Imagine you’ve got a DOKS cluster, and you want to monitor its resource utilization.

First, ensure you have the DigitalOcean Kubernetes integration enabled for your cluster. You can do this via the DigitalOcean Cloud Control Panel. Navigate to your Kubernetes cluster, then to the "Integrations" tab, and enable "DigitalOcean Metrics." This process automatically deploys a digitalocean-metrics DaemonSet to your cluster.

This DaemonSet isn’t just sending data; it’s exposing an endpoint that DigitalOcean’s backend scrapes. The DaemonSet pods run as node-exporter and kube-state-metrics.

Here’s a peek at a typical node-exporter pod’s configuration within the DaemonSet:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: digitalocean-metrics
  namespace: kube-system
spec:
  template:
    spec:
      containers:
      - name: node-exporter
        image: digitalocean/node-exporter:v1.5.0
        ports:
        - name: metrics
          containerPort: 9100
          hostPort: 9100
        resources:
          requests:
            cpu: 50m
            memory: 100Mi
          limits:
            cpu: 100m
            memory: 200Mi
        volumeMounts:
        - name: host-proc
          mountPath: /host/proc
          readOnly: true
        - name: host-sys
          mountPath: /host/sys
          readOnly: true
      # ... other parts of the DaemonSet spec

Notice the hostPort: 9100. This means the node-exporter container on each node is directly exposing its metrics endpoint on port 9100 of the node itself. DigitalOcean’s scraping infrastructure then targets http://<node-ip>:9100/metrics.

kube-state-metrics runs similarly, exposing cluster-level state information on a different port, typically 8080, which DigitalOcean also scrapes from the node.

The real magic happens on DigitalOcean’s side. They have a fleet of collectors that are configured with the IP addresses and ports of your DOKS nodes. These collectors periodically pull the /metrics endpoint from each node-exporter and kube-state-metrics instance. The collected time-series data is then ingested into their monitoring platform.

This pull model is crucial because it means your cluster doesn’t need outbound network access to a third-party monitoring service. All communication is initiated from DigitalOcean’s infrastructure to your nodes. The DaemonSet’s primary role is to make the metrics available locally on each node.

You can explore this data in the DigitalOcean Cloud Control Panel under the "Metrics" section for your Kubernetes cluster. You’ll see graphs for CPU, memory, disk I/O, network traffic, and Kubernetes-specific metrics like pod counts and deployment status.

When you’re working with these metrics, it’s important to understand what node-exporter and kube-state-metrics are exposing. node-exporter provides hardware and OS-level metrics for each node (e.g., node_cpu_seconds_total, node_memory_MemAvailable_bytes). kube-state-metrics translates Kubernetes object states into metrics (e.g., kube_pod_info, kube_deployment_status_replicas_available). DigitalOcean aggregates and visualizes these.

A common misconception is that the digitalocean-metrics DaemonSet is pushing data. It’s not. It’s merely an agent exposing metrics locally. The system’s pull nature simplifies firewall configurations and improves security posture by limiting outbound connections from your cluster.

If you ever need to debug why metrics aren’t appearing, the first place to check is the digitalocean-metrics DaemonSet itself. Ensure the pods are running on all your nodes. You can then kubectl exec into one of these pods and try to curl the local metrics endpoint (e.g., curl http://localhost:9100/metrics) to verify data is being generated.

The next step in your monitoring journey will involve setting up custom alerts based on these collected metrics.

Want structured learning?

Take the full Digitalocean course →