
Dt Obs Kubernetes
Query Dynatrace-style Kubernetes inventory—clusters, namespaces, pod/workload distribution, and multi-cluster comparisons—for observability troubleshooting.
Overview
dt-obs-kubernetes is an agent skill for the Operate phase that provides Kubernetes cluster and namespace inventory query patterns for Dynatrace-style observability.
Install
npx skills add https://github.com/dynatrace/dynatrace-for-ai --skill dt-obs-kubernetesWhat is this skill?
- Cluster queries: list all clusters, version summary, nodes-per-cluster counts
- Namespace patterns: per-cluster counts, system namespace filters, empty namespace detection
- Resource distribution: pods and workloads per cluster and namespace summaries
- Multi-cluster compare and find-clusters-with-workload style investigations
- Reference-oriented query cookbook for Kubernetes organizational hierarchy
- Reference sections cover cluster queries, namespace queries, resource distribution, and multi-cluster queries as four ma
Adoption & trust: 660 installs on skills.sh; 87 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You run multiple Kubernetes clusters but cannot quickly list topology, namespace sprawl, or where pods and workloads actually live when debugging production.
Who is it for?
Indie teams operating Dynatrace-monitored K8s who want an agent cheat sheet for inventory and distribution questions.
Skip if: Local docker-compose apps with no Kubernetes estate or teams without Dynatrace (or compatible) Kubernetes entity ingestion.
When should I use this skill?
User needs Kubernetes cluster/namespace inventory, resource distribution counts, system-namespace filtering, empty-namespace discovery, or multi-cluster comparison in Dynatrace context.
What do I get? / Deliverables
You execute structured inventory queries—clusters, namespaces, resource counts, and multi-cluster comparisons—so monitoring investigations start from facts, not guesswork.
- Cluster and namespace inventory query results interpretation
- Resource distribution summary per cluster/namespace
- Multi-cluster comparison or workload-location findings
Recommended Skills
Journey fit
Kubernetes inventory deep dives belong in Operate when the product is live and you need topology awareness, not during first UI mockups. Monitoring subphase covers entity inventory and distribution queries that precede alert tuning and SLO dashboards.
How it compares
Use instead of kubectl-only mental maps when you need cross-cluster inventory analytics aligned to observability entity models.
Common Questions / FAQ
Who is dt-obs-kubernetes for?
Solo and small-team operators managing production Kubernetes behind Dynatrace who want agents to run consistent inventory queries before diving into logs or traces.
When should I use dt-obs-kubernetes?
In Operate monitoring when mapping clusters and namespaces, finding empty namespaces, comparing fleets, or locating workloads across clusters; also during infra iterate passes when cleaning up sprawl.
Is dt-obs-kubernetes safe to install?
The skill describes read-oriented inventory queries; actual risk depends on your observability API credentials and scopes—check the Security Audits panel on this Prism page and restrict tokens to read-only entity access.
SKILL.md
READMESKILL.md - Dt Obs Kubernetes
# Kubernetes Cluster and Namespace Inventory - Reference Deep dive into cluster and namespace inventory queries for understanding Kubernetes topology, resource distribution, and organizational hierarchy. ## Overview Cluster and namespace entities provide the organizational foundation for Kubernetes resources. This reference covers comprehensive querying patterns for cluster topology, namespace distribution, and resource organization. ## Contents - [Cluster Queries](#cluster-queries) - [List All Clusters](#list-all-clusters) - [Cluster by Distribution](#cluster-by-distribution) - [Cluster Version Summary](#cluster-version-summary) - [Count Nodes per Cluster](#count-nodes-per-cluster) - [Namespace Queries](#namespace-queries) - [List All Namespaces](#list-all-namespaces) - [Count Namespaces per Cluster](#count-namespaces-per-cluster) - [Filter System Namespaces](#filter-system-namespaces) - [Find Empty Namespaces](#find-empty-namespaces) - [Resource Distribution](#resource-distribution) - [Count All Resources per Cluster](#count-all-resources-per-cluster) - [Pod Distribution per Cluster](#pod-distribution-per-cluster) - [Workload Distribution per Cluster](#workload-distribution-per-cluster) - [Namespace Resource Summary](#namespace-resource-summary) - [Multi-Cluster Queries](#multi-cluster-queries) - [Compare Clusters](#compare-clusters) - [Find Clusters with Specific Workload](#find-clusters-with-specific-workload) - [Namespace Naming Patterns](#namespace-naming-patterns) - [Cluster Health Overview](#cluster-health-overview) - [Cluster Entity Count](#cluster-entity-count) - [Clusters with Nodes](#clusters-with-nodes) - [Namespace Analysis](#namespace-analysis) - [Largest Namespaces by Pod Count](#largest-namespaces-by-pod-count) - [Namespace Age](#namespace-age) - [Namespaces by Label](#namespaces-by-label) - [Resource Organization](#resource-organization) - [Services per Namespace](#services-per-namespace) - [ConfigMaps per Namespace](#configmaps-per-namespace) - [Secrets per Namespace](#secrets-per-namespace) - [Advanced Patterns](#advanced-patterns) - [Multi-Cluster Resource Comparison](#multi-cluster-resource-comparison) - [Namespace Resource Density](#namespace-resource-density) - [Cluster Growth Tracking](#cluster-growth-tracking) - [Best Practices](#best-practices) - [Related Topics](#related-topics) ## Cluster Queries ### List All Clusters ```dql // List all Kubernetes clusters monitored by Dynatrace smartscapeNodes K8S_CLUSTER | fields k8s.cluster.name, k8s.cluster.uid, k8s.cluster.version, k8s.cluster.distribution | sort k8s.cluster.name ``` ### Cluster by Distribution ```dql // Count clusters by Kubernetes distribution smartscapeNodes K8S_CLUSTER | summarize count(), by: {k8s.cluster.distribution} | sort k8s.cluster.distribution ``` ### Cluster Version Summary ```dql // List clusters with their Kubernetes versions smartscapeNodes K8S_CLUSTER | fields k8s.cluster.name, k8s.cluster.version, k8s.cluster.distribution | sort k8s.cluster.version desc ``` ### Count Nodes per Cluster ```dql // Count nodes in each cluster smartscapeNodes K8S_NODE | summarize node_count = count(), by: {k8s.cluster.name} | sort node_count desc ``` ## Namespace Queries ### List All Namespaces ```dql // List all namespaces across all clusters smartscapeNodes K8S_NAMESPACE | fields k8s.cluster.name, k8s.namespace.name | sort k8s.cluster.name, k8s.namespace.name ``` ### Count Namespaces per Cluster ```dql // Count namespaces in each cluster smartscapeNodes K8S_NAMESPACE | summarize namespace_count = count(), by: {k8s.cluster.name} | sort namespace_count desc ``` ### Filter System Namespaces ```dql // List only application namespaces (exclude system) smartscapeNodes K8S_NAMESPACE | filterOut in(k8s.namespace.name, {"kube-system", "kube-public", "kube-node-lease", "dynatrace"}) | fields k8s.cluster.name, k8s.namespace.name | sort k8s.cluster.name, k8s.namespace.name ``` ### F