Overview

Metoro provides comprehensive tracking of Kubernetes resources, capturing every update to give you a complete history of your cluster’s state. This “time-travel” capability allows you to view your cluster’s state at any point in time, not just its current state.

Resource Tracking

The cluster agent watches and exports the following Kubernetes resources:

  • Pods
  • Deployments
  • StatefulSets
  • ReplicaSets
  • DaemonSets
  • Nodes
  • ConfigMaps
  • Services
  • Jobs
  • CronJobs
  • Endpoints
  • Events
  • Horizontal Pod Autoscalers
  • Ingresses
  • Namespaces

Metoro explicitly does not export secrets. If you have resources you want to exclude from exporting, you can remove them from the service account permissions given to the cluster agent. See the permissions here.

Resource Metrics

Kubernetes resources can be analyzed using the kubernetes_resource metric type. This allows you to:

Count Resources

Track the number of resources by various attributes:

# Count pods by service
kubernetes_resource{kind="Pod"}
| group_by(service_name)

# Count resources by namespace
kubernetes_resource{kind="Deployment"}
| group_by(namespace)

Resource Attributes

Common attributes available for filtering and grouping:

  • Environment
  • Namespace
  • Kind
  • Resource name
  • Service name
  • Additional attributes specific to resource types

Track Resource State

Monitor specific resource attributes over time:

# Track HPA expected replicas
kubernetes_resource{kind="HorizontalPodAutoscaler"}
| select(max(status.expectedReplicas))

# Compare current vs desired replicas
kubernetes_resource{kind="HorizontalPodAutoscaler"}
| select(
    max(status.currentReplicas),
    max(status.desiredReplicas)
)

Viewing Resources

You can view resources associated with each service in the Metoro UI:

  1. Navigate to a service page
  2. Select the Kubernetes tab
  3. View current and historical resource states

Use Cases

  1. Change Tracking:
  • Track configuration changes
  • Monitor scaling events
  • Debug resource modifications
  1. Resource Analysis:
  • Count resources by type
  • Monitor replica counts
  • Track resource distribution
  1. Historical Debugging:
  • View past cluster states
  • Analyze resource evolution
  • Investigate incidents

Best Practices

  1. Resource Monitoring:
  • Track critical resource counts
  • Monitor scaling patterns
  • Set up alerts for unexpected changes
  1. Historical Analysis:
  • Use time-travel for debugging
  • Compare states across time periods
  • Track configuration evolution
  1. Metric Usage:
  • Group resources meaningfully
  • Track relevant attributes
  • Combine with other metric types