An application running on Azure Kubernetes Service (AKS) can appear healthy while experiencing serious network problems. All pods may show a Running status, CPU and memory usage may remain normal, and Kubernetes may report no obvious infrastructure failures. Yet users continue to experience slow responses, intermittent connection failures, and requests that time out.
Consider an e-commerce application with separate services for product catalogs, customer accounts, payments, and order processing. When a customer places an order, several pods communicate with each other to complete the transaction. If the payment service starts dropping network packets, the order-processing service may experience timeouts even though both services are healthy from a CPU and memory perspective.
This is where traditional Kubernetes monitoring can leave an important gap. A cluster-level traffic counter might show that packets are being dropped, but it may not tell you which pod is responsible, which destination is affected, or whether the problem involves TCP, DNS, or a network policy.
Azure Kubernetes Service provides Container Network Observability through Advanced Container Networking Services (ACNS). It collects network metrics at both node and pod levels and exposes useful dimensions that help developers and platform engineers investigate traffic patterns.
These dimensions help you move from a general observation, such as increased packet drops, to more useful questions: Which application is generating the traffic? Where is it going? Which network protocol is involved? Why is the traffic being dropped?
This article walks through how AKS container network observability works, how its metrics and dimensions are organized, how to enable collection with Azure Monitor managed Prometheus, and how to use PromQL and Grafana to investigate network problems.
Why Network Observability Needs More Than Node Metrics
Kubernetes monitoring usually starts with infrastructure metrics. Teams monitor CPU utilization, memory consumption, pod restarts, node health, and application response times.
These metrics are important, but they don't always explain network-related failures.
For example, imagine that your cluster contains three application workloads:
order-service
payment-service
inventory-service
The order-service sends requests to payment-service and inventory-service. Suddenly, the application begins reporting connection failures.
A node-level metric might show that 15,000 packets were dropped during the affected period. This confirms that a network problem exists, but it doesn't tell the engineering team which workload caused the problem or which communication path was affected.
Pod-level observability provides much more context. It can identify traffic associated with a source or destination pod, preserve the node information, and expose additional details such as protocol, direction, verdict, and drop reason.
The difference becomes clearer when you compare the monitoring levels:
Monitoring level | Information available | Example investigation |
|---|
Cluster level | Overall network activity | Is the cluster experiencing increased packet drops? |
Node level | Traffic and drops associated with a node | Is one node responsible for most network errors? |
Pod level | Traffic associated with individual workloads | Which application pod is experiencing dropped traffic? |
Protocol level | TCP, DNS, and other protocol observations | Are DNS requests failing or TCP connections being reset? |
Flow level | Source, destination, and traffic verdict | Which application communication path is failing? |
The more context a metric provides, the easier it becomes to narrow down the cause of a problem.
However, collecting detailed metrics also creates additional time series and can increase monitoring costs. You should collect enough information to answer operational questions without recording unnecessary network details.
Understanding Container Network Observability in AKS
Container Network Observability is part of Azure Advanced Container Networking Services.
It provides network metrics that help you understand traffic volume, packet drops, DNS behavior, TCP activity, and communication between Kubernetes workloads.
The collection process depends on the cluster's networking data plane.
On Linux nodes using Azure CNI Powered by Cilium, eBPF hooks capture network activity in the kernel. Cilium processes these observations, and Hubble exposes network metrics in Prometheus format.
On supported Linux nodes that don't use Cilium, eBPF hooks feed network observations into Microsoft Retina, with a Hubble layer used for flow inspection. Retina collects and exports the available metrics.
The general data flow looks like this:
Kubernetes Workloads
|
v
Network Traffic
|
v
eBPF Kernel Hooks
|
v
Cilium / Retina
|
v
Hubble Metrics Endpoint
|
v
Prometheus Collection
|
v
Azure Monitor Managed Prometheus
|
v
Grafana Dashboards
This architecture allows network observations to be collected without requiring you to modify application code.
The metrics can be stored in Azure Monitor managed service for Prometheus or collected by an existing Prometheus deployment. Grafana provides dashboards for visualizing traffic and investigating network behavior.
One distinction is worth keeping in mind: Container Network Observability isn't the same as collecting container logs. Metrics provide aggregated measurements, while network flow logs provide more detailed information about selected communication events.
Understanding Network Observability Dimensions
A metric provides a measurement, but its dimensions provide the context needed to understand that measurement.
For example, consider a metric that counts dropped packets. Without additional information, you know only that some packets were dropped.
Now imagine that the metric includes the following dimensions:
cluster
instance
source
destination
protocol
reason
direction
These labels allow you to group and filter observations according to the application, node, communication path, or network behavior.
In Prometheus terminology, these dimensions are represented as labels attached to a time series.
Cluster
The cluster label identifies the AKS cluster that produced the metric.
This becomes especially useful when you manage multiple AKS clusters and send their metrics to the same Azure Monitor workspace.
For example, your organization might operate production clusters in different regions. The cluster label allows the platform team to distinguish network activity from each environment.
Instance
The instance label identifies the node associated with the observation.
Suppose packet drops suddenly increase. Grouping metrics by instance helps you identify whether one node is responsible for most of the drops.
You can then investigate node-specific problems such as network configuration issues, resource pressure, or an unhealthy network path.
Source and destination
These labels identify the source or destination pod involved in network activity.
For outgoing traffic, the source label identifies the source pod's namespace and name. For incoming traffic, the destination label identifies the destination pod's namespace and name.
For example:
source="production/order-service-7d9f8"
destination="production/payment-service-6c5b2"
These labels let you investigate communication between individual workloads instead of looking only at the cluster's overall traffic.
Protocol
The protocol label identifies the type of network traffic being observed.
Depending on the metric, this can help you distinguish TCP, UDP, and DNS-related activity.
For example, a large number of TCP resets may indicate connection-management problems, while increasing DNS errors may point toward name-resolution issues.
Direction
The direction label distinguishes incoming and outgoing network activity where the metric exposes that dimension.
This is useful when a service receives traffic successfully but experiences problems when sending requests to another workload.
Verdict and reason
Flow-related metrics can expose a verdict indicating whether traffic was forwarded or dropped.
Drop metrics can also include a reason explaining why a packet was discarded.
For example, a policy-related drop may indicate that a Kubernetes NetworkPolicy or CiliumNetworkPolicy is preventing communication.
Remember that the available labels depend on the metric being collected. Not every metric contains every dimension, and Cilium and non-Cilium data planes can expose different metric names and labels.
Understanding Node-Level Network Metrics
Node-level metrics give you an overall view of network activity associated with individual Kubernetes nodes.
They help answer questions such as:
Which node forwards the most traffic?
Are packet drops increasing on a particular node?
Is a node experiencing connection-tracking pressure?
Are TCP retransmissions increasing?
Is node-to-node connectivity behaving normally?
For Cilium data plane clusters, important node-level metrics include:
Metric | Purpose |
|---|
cilium_forward_count_total | Total number of forwarded packets |
cilium_forward_bytes_total | Total number of forwarded bytes |
cilium_drop_count_total | Total number of dropped packets |
cilium_drop_bytes_total | Total number of dropped bytes |
These metrics include cluster and instance labels. Forwarding and drop metrics also expose additional labels such as direction and reason.
For non-Cilium data planes, AKS exposes metrics such as:
Metric | Purpose |
|---|
networkobservability_forward_count | Forwarded packet count |
networkobservability_forward_bytes | Forwarded byte count |
networkobservability_drop_count | Dropped packet count |
networkobservability_drop_bytes | Dropped byte count |
networkobservability_conntrack_total_connections | Total connection-tracking connections |
networkobservability_tcp_retransmission_count | TCP retransmission count |
The exact availability depends on the operating system and data plane. Some metrics are Linux-only, while others also support Windows nodes.
Measuring forwarded traffic
A Prometheus counter normally increases over time. To understand the current traffic rate rather than the total accumulated value, use the rate function.
For example, on a Cilium cluster:
sum by (instance, direction) (
rate(cilium_forward_count_total[5m])
)
This query calculates the average forwarded packet rate over the last five minutes and groups the results by node and traffic direction.
The output helps you identify nodes handling unusually high packet volumes.
To calculate forwarded traffic in bytes per second:
sum by (instance, direction) (
rate(cilium_forward_bytes_total[5m])
)
This is useful for capacity planning because packet count alone doesn't tell you how much data is moving through the network.
Monitoring packet drops
You can use a similar query to identify packet drops by node and reason:
sum by (instance, direction, reason) (
rate(cilium_drop_count_total[5m])
)
If one node begins reporting a much higher drop rate than the others, you can investigate that node first.
A drop metric shouldn't automatically be interpreted as an application failure. Some network drops may be expected because of security policies or intentionally rejected traffic. Examine the reason and traffic context before deciding that the behavior is incorrect.
Understanding Pod-Level Network Metrics
Node-level metrics identify infrastructure-level problems. Pod-level metrics help you identify which applications are involved.
AKS exposes pod-level network metrics through Hubble.
These metrics preserve node information and include source or destination labels, allowing traffic to be grouped by workload.
Important Hubble metrics include:
Metric | Information provided |
|---|
hubble_dns_queries_total | DNS query count |
hubble_dns_responses_total | DNS response count and response information |
hubble_drop_total | Dropped packet count |
hubble_tcp_flags_total | TCP packet counts by flag |
hubble_flows_processed_total | Processed Layer 4 and Layer 7 network flows |
These metrics are particularly useful when you're investigating communication between microservices.
For example, if payment-service begins experiencing failures, you can filter the metrics by its namespace and pod name rather than examining every workload in the cluster.
Finding the workloads generating dropped packets
The following PromQL query groups dropped packets by source, destination, and reason:
sum by (source, destination, reason, protocol) (
rate(hubble_drop_total[5m])
)
This provides a more detailed view than a node-level drop counter.
You can identify whether the drops involve payment-service, order-service, or another workload.
The reason label helps distinguish policy-related drops from other observed drop conditions.
Monitoring TCP resets
TCP reset packets can provide useful information about connection failures.
For example, your application may be receiving connections that are being terminated unexpectedly.
The following query identifies TCP reset observations:
sum by (source, destination) (
rate(hubble_tcp_flags_total{flag="RST"}[5m])
)
If the metric shows a sudden increase for one destination pod, investigate whether that service is closing connections unexpectedly, rejecting requests, or experiencing connection pressure.
TCP reset counts are network observations, not direct measurements of application errors. Correlate them with application logs and request telemetry before identifying the root cause.
Enabling Container Network Observability
To collect these metrics, your AKS cluster must meet the supported ACNS and monitoring requirements.
You'll need:
An Azure subscription.
Azure CLI.
The current AKS preview extension where required by the selected configuration.
kubectl.
An AKS cluster using a supported Kubernetes version and node operating system.
An Azure Monitor workspace or an existing Prometheus backend.
Appropriate permissions to update the cluster and monitoring resources.
The following example uses an existing AKS cluster.
Set the required environment variables:
az login
az account set --subscription "<subscription-id>"
export RESOURCE_GROUP="aks-production-rg"
export CLUSTER_NAME="production-cluster"
export LOCATION="eastus"
Enable Advanced Container Networking Services:
az aks update \
--resource-group "$RESOURCE_GROUP" \
--name "$CLUSTER_NAME" \
--enable-acns
Enabling ACNS doesn't change the existing cluster's data plane. The capabilities available depend on whether the cluster uses Cilium or a supported non-Cilium configuration.
Connect to the cluster:
az aks get-credentials \
--resource-group "$RESOURCE_GROUP" \
--name "$CLUSTER_NAME"
Verify the current Kubernetes context:
kubectl config current-context
kubectl get nodes
Always confirm that kubectl is connected to the intended cluster before applying configuration changes.
Connecting AKS to Azure Monitor Managed Prometheus
Azure Monitor managed service for Prometheus provides managed collection and storage for Prometheus metrics.
An Azure Monitor workspace is required for the managed Prometheus collection path. A Log Analytics workspace stores logs and isn't a replacement for the Prometheus metrics workspace.
Create an Azure Monitor workspace if you don't already have one:
export AZURE_MONITOR_NAME="aks-monitoring"
az resource create \
--resource-group "$RESOURCE_GROUP" \
--namespace Microsoft.Monitor \
--resource-type accounts \
--name "$AZURE_MONITOR_NAME" \
--location "$LOCATION" \
--properties '{}'
Retrieve its resource ID:
AZURE_MONITOR_ID=$(az resource show \
--resource-group "$RESOURCE_GROUP" \
--name "$AZURE_MONITOR_NAME" \
--resource-type "Microsoft.Monitor/accounts" \
--query id \
--output tsv)
Enable managed Prometheus collection for the cluster:
az aks update \
--name "$CLUSTER_NAME" \
--resource-group "$RESOURCE_GROUP" \
--enable-azure-monitor-metrics \
--azure-monitor-workspace-resource-id "$AZURE_MONITOR_ID"
Verify that the Azure Monitor metrics pods are running:
kubectl get pods -n kube-system -o wide | grep ama-metrics
The monitoring pods should be ready before you investigate whether metrics are reaching the workspace.
For a basic setup, Azure Monitor managed Prometheus collects node-level network metrics by default. To obtain more detailed pod-level observations, use Container Network Observability.
Azure also provides built-in networking dashboards through the AKS portal. You don't need a separate Azure Managed Grafana instance to use those portal dashboards.
Filtering Metrics by Application
Collecting every possible network observation from a large cluster can create unnecessary time series and increase ingestion costs.
Cilium clusters support source-level filtering through a Kubernetes custom resource named ContainerNetworkMetric.
This resource controls which network observations contribute to selected metrics.
For example, you might want to monitor only the checkout application in the production namespace.
The following configuration selects flow observations generated by pods whose names start with checkout-:
apiVersion: acn.azure.com/v1alpha1
kind: ContainerNetworkMetric
metadata:
name: container-network-metric
spec:
filters:
- metric: flow
includeFilters:
- name: checkout-traffic
from:
namespacedPod:
- "production/checkout-"
Apply the configuration:
kubectl apply -f network-metrics.yaml
Check its status:
kubectl get containernetworkmetric \
container-network-metric \
-o yaml
The status should report CONFIGURED after the controller processes a valid configuration. Review the warnings or failure reason if the configuration isn't accepted.
There are several important details about this resource.
First, there's one shared ContainerNetworkMetric resource per cluster. Multiple teams must coordinate changes rather than creating separate resources for different applications.
Second, includeFilters select traffic that should contribute to a metric. Exclude filters can remove selected traffic from that collection, and exclusions take precedence when both filters match.
Third, this resource doesn't allow or block network traffic. It controls metric collection only. Network security policies must be configured separately.
Finally, filtering doesn't create new metric labels. The service manages the dimensions exposed by each metric.
Querying Network Metrics With PromQL
Once collection is configured, you can use PromQL to analyze the metrics.
The following examples assume that the corresponding metric families are available in your Prometheus backend.
Monitoring DNS requests and responses
DNS failures can affect several application services at the same time.
The following query calculates the DNS request rate by source workload:
sum by (source) (
rate(hubble_dns_queries_total[5m])
)
To examine DNS responses by response code:
sum by (source, rcode) (
rate(hubble_dns_responses_total[5m])
)
A sudden increase in NXDOMAIN or SERVFAIL responses may indicate incorrect DNS names, an upstream resolver problem, or a policy configuration issue.
DNS metrics on Cilium clusters require DNS visibility to be configured through a suitable Cilium FQDN policy. A metric filter alone doesn't enable DNS inspection.
Comparing traffic across workloads
The flow metric can help identify which workloads are generating the most observed network activity.
For example:
sum by (source, protocol, verdict) (
rate(hubble_flows_processed_total[5m])
)
This groups processed flow observations by source workload, protocol, and verdict.
A forwarded verdict indicates traffic that was allowed through the observed networking path. A dropped verdict indicates that the observed traffic was discarded.
One detail is easy to miss: the metric may not be collected by Azure Monitor managed Prometheus by default because it can produce a large number of time series. When you need it, its name must be added to the existing Hubble allow list.
Identifying network traffic by node
To compare forwarded traffic across nodes on a Cilium cluster:
sum by (cluster, instance, direction) (
rate(cilium_forward_bytes_total[5m])
)
This query is useful when you're investigating whether a particular node is handling a disproportionate amount of network traffic.
It can also help identify uneven workload placement that may contribute to capacity problems.
Visualizing Network Activity With Grafana
PromQL provides the data, but dashboards make it easier to understand changes over time.
AKS provides built-in Kubernetes networking dashboards through Azure Monitor.
Open the Azure portal and follow these steps:
Open your AKS cluster.
Navigate to Monitoring.
Select Dashboards with Grafana.
Open the Kubernetes networking dashboards.
Choose the relevant namespace, workload, and time range.
The available dashboards include:
Dashboard | Purpose |
|---|
Clusters | Node-level network health and traffic |
DNS (Cluster) | DNS activity across the cluster |
DNS (Workload) | DNS behavior for a selected workload |
Drops (Workload) | Packet drops associated with a workload |
Pod Flows (Namespace) | Network activity involving pods in a namespace |
Pod Flows (Workload) | Detailed traffic observations for a workload |
A useful troubleshooting workflow starts with the Clusters dashboard. If it shows a sudden increase in packet drops, move to the workload or namespace dashboards to identify the affected application.
If you're investigating DNS, open the DNS dashboards. If you're investigating dropped packets, use the Drops dashboard to examine the affected workloads and reasons.
Allow enough time for metric scraping and ingestion before concluding that a dashboard is empty. An empty dashboard can indicate missing collection, missing traffic, an incorrect time range, or a filter that doesn't match the selected workload.
Using Network Metrics to Troubleshoot Production Problems
Let's bring these concepts together with a practical scenario.
Suppose your production application starts reporting intermittent timeouts from order-service. The application logs show that requests to payment-service are failing, but CPU and memory metrics remain normal.
You can investigate the problem in a structured way.
Start with cluster-level metrics
Open the Clusters dashboard and check whether forwarded traffic and dropped packets changed around the time the failures started.
If one node has a significantly higher drop rate, record its name and continue the investigation at the node or workload level.
Identify the affected workload
Open the Pod Flows or Drops dashboard and select the production namespace.
Look for the source and destination pods involved in the failing communication.
This helps determine whether the problem affects all payment-service replicas or only one pod.
Examine the drop reason
Review the drop metrics and identify the reason associated with the affected traffic.
A policy-denied drop suggests that a network policy may be blocking a legitimate request.
A connection-tracking problem suggests that the node's connection-tracking resources may be under pressure.
Let the drop reason guide the next investigation rather than immediately changing network policies.
Correlate with application telemetry
Compare the network observations with application logs, distributed traces, and service health metrics.
For example, if network metrics show dropped traffic between order-service and payment-service at the same time that the application reports connection timeouts, the two signals provide stronger evidence of a network-related issue.
Network metrics alone don't measure application response latency. Use Application Insights, OpenTelemetry, or service-specific telemetry when investigating request duration.
Verify the correction
After correcting the network policy, node configuration, or workload issue, return to the same dashboards and queries.
The affected drop rate should decrease, and the application should recover.
Using the same metric and time range before and after the change provides a more reliable validation than relying only on a temporary improvement reported by users.
Monitoring Costs and Important Limitations
Detailed network monitoring is useful, but it should be enabled according to your actual operational requirements.
ACNS is a paid offering. The Azure portal dashboard experience doesn't require an additional Grafana dashboard charge, but ACNS and metrics ingestion and storage can still incur costs.
High-cardinality metrics deserve particular attention.
For example, collecting traffic by source pod, destination IP, and destination port can generate many time series. This level of detail may be necessary during an investigation, but collecting every possible dimension continuously can increase ingestion volume.
A few practices can help keep collection manageable:
Begin with node-level metrics and add pod-level details when needed.
Filter Cilium metrics to the applications and namespaces that matter.
Avoid collecting external destination IP and port dimensions for unrelated workloads.
Review the number of active time series after enabling additional metrics.
Preserve existing shared metric configuration when making changes.
Verify that the required metric is collected by both the agent and Prometheus.
Use network flow logs when individual traffic records are needed.
There are also feature-specific limitations:
Node-level metrics are available across supported Cilium and non-Cilium data planes.
Pod-level metrics require Linux nodes.
Source-level metric filtering is available only on Cilium clusters.
DNS metrics on Cilium require an appropriate FQDN network policy.
HTTP metrics require Layer 7 enablement and an HTTP inspection policy.
Metrics don't provide a complete record of every individual network flow.
ACNS network metrics don't measure application or network latency directly.
When you need detailed traffic records, use Container Network Logs or on-demand Hubble inspection. Metrics are best suited for trends, alerts, and dashboards, while logs and live flow inspection provide more information for root-cause analysis.
Conclusion
Container Network Observability in AKS gives you a way to understand network behavior beyond basic node and pod health metrics.
Node-level metrics help identify infrastructure problems, while pod-level Hubble metrics provide source and destination context for application traffic. Dimensions such as cluster, instance, source, destination, protocol, direction, verdict, and reason make it possible to investigate network behavior at a more useful level.
Azure Monitor managed Prometheus and Grafana provide a convenient collection and visualization path. Cilium clusters can also use ContainerNetworkMetric to filter selected observations before they reach the monitoring backend.
A practical approach is to start with broad network-health metrics, identify the affected node or workload, and then use the available dimensions to narrow the investigation. Combine these observations with application logs and distributed traces when diagnosing production incidents.
By collecting the right network signals and controlling metric cardinality, platform teams can improve troubleshooting, identify traffic imbalances, and maintain better visibility into communication between Kubernetes workloads.
Join the conversation! Your thoughts help the community grow.