Troubleshooting AKS Networking with Hubble and Hubble UI: Three Practical Scenarios

Troubleshooting AKS Networking with Hubble and Hubble UI: Three Practical Scenarios

Use real AKS flow logs and Hubble UI screenshots to diagnose a wrong-port network policy, DNS and FQDN egress failures, and HTTP 403s caused by Layer 7 policy.

The pods are running. The Service exists. The frontend still cannot reach the backend.

The frontend log says FAILED. Did it get the wrong address? Was the connection blocked? Or did the server answer with an error? Those problems need different fixes.

A Hubble flow is a record of something Cilium saw on the network. This guide walks you through deploying an AKS lab, connecting to Hubble CLI and Hubble UI, and troubleshooting three common failures. In the lab, frontend makes requests and backend answers them:

  1. http://backend/get times out. Which port did the policy block?
  2. backend-typo and www.microsoft.com both fail. Did DNS fail both times?
  3. /get returns 200, but /headers returns 403 on the same backend. Why?

Demo source: AKS-Cilium-Hubble-Troubleshooting. You can also refer to the source version used in this guide.

Lab safety: These scenarios deliberately interrupt traffic in hubble-demo. Use a disposable lab, not a production cluster. Run the scenarios in order: each one builds on the rules from the previous scenario. The cleanup section explains how to reset the policies or remove the lab.

Why Hubble Matters During an Incident

Start in Hubble UI if you don’t know who is talking to whom. Choose the namespace, find the two workloads on the map, then select a row in the flows table. You can see which client tried to reach which port without having to match IP addresses to pods yourself.

Use the Hubble CLI when you know what to look for. For example, you can ask for only dropped traffic from frontend to backend. That’s useful in a busy cluster: the backend might be accepting connections from one client while blocking another.

Two terms will come up throughout the demos. Ingress means traffic coming into the workload a policy protects; egress means traffic going out. The verdict tells you what happened at that point: DROPPED means the traffic was stopped; FORWARDED means it continued. Even an HTTP error can be forwarded back to a client.

How the Components Fit Together

flowchart LR
    subgraph Demo["hubble-demo namespace"]
        Frontend["frontend: curl loop"] --> Service["backend Service:80"]
        Untrusted["untrusted-client"] --> Service
        Service --> Backend["backend pods:8080"]
    end
    Frontend --> DNS["CoreDNS:53"]
    Frontend --> External["api.github.com / www.microsoft.com"]
    Agents["Cilium agents + Hubble servers"] --> Relay["Hubble Relay"]
    Relay --> CLI["Hubble CLI via mTLS"]
    Relay --> UI["Hubble UI backend via mTLS"]
    UI --> Browser["Browser via localhost port-forward"]

Cilium applies the rules; Hubble reports what happened. Each node keeps its own recent flows. Hubble Relay lets the CLI and the UI read those flows across both nodes. The UI draws connections it sees, so a quiet workload may not appear on the map.

This lab uses Azure’s managed Cilium. Azure CNI Overlay provides pod networking, and Advanced Container Networking Services (ACNS) enables the Hubble observations and policy features used here. There’s no second Cilium installation to manage.

Deploy the Demo Infrastructure

Step 1: Prepare Your Tools and Azure Subscription

You’ll need:

  • An Azure subscription with permission to create a resource group and an AKS cluster, plus enough VM quota for the lab.
  • A Bash terminal with Git, Azure CLI, Terraform 1.6 or later, and kubectl.
  • Hubble CLI for reading flows from your terminal.

On macOS with Homebrew, install Hubble CLI with:

brew install hubble

For Linux installation and current AKS requirements, follow the Hubble setup guide and L7 policy prerequisites.

The examples use Kubernetes v1.36.5, Hubble CLI v1.16.0, and Hubble UI v0.12.2. These describe the example environment, not versions you must install. Choose a currently supported AKS version in your region.

Cost: AKS nodes and ACNS incur charges. Use the cleanup steps when you finish the lab.

Step 2: Download the Demo and Sign In

git clone https://github.com/kasunsjc/Code-Snippets.git
cd Code-Snippets/AKS-Cilium-Hubble-Troubleshooting

az login
az account set --subscription "<subscription-id-or-name>"
export ARM_SUBSCRIPTION_ID="$(az account show --query id --output tsv)"

Replace the subscription placeholder with your lab subscription. The Terraform AzureRM provider uses ARM_SUBSCRIPTION_ID, so keep it set in the shell where you deploy.

Step 3: Choose the Lab Settings

Create your local settings file:

cp terraform/terraform.tfvars.example terraform/terraform.tfvars

Open terraform/terraform.tfvars and review the names, region, and node size. The main settings look like this:

resource_group_name = "rg-hubble-demo"
cluster_name        = "aks-hubble-demo"
location            = "northeurope"

node_vm_size   = "Standard_D4s_v3"
node_count     = 2
node_min_count = 2
node_max_count = 4

Use names that do not collide with existing resources. Check that your chosen VM size is available and has enough quota in the region. If you set kubernetes_version, choose a supported version that meets the linked ACNS requirements; otherwise the configuration uses the region’s default.

Step 4: Deploy AKS, Hubble UI, and the Demo Apps

Review the Terraform files before running the deployment. The helper uses terraform apply -auto-approve, so it does not stop for a separate Terraform approval prompt.

From the demo directory, run:

./deploy.sh

The script:

  1. Creates the resource group and AKS cluster with Azure CNI Overlay, Cilium, and ACNS.
  2. Enables the L7 policy mode needed for the HTTP and domain-name rules.
  3. Adds the cluster credentials to your local kubeconfig.
  4. Waits for Hubble Relay and its client certificate Secret.
  5. Deploys Hubble UI in kube-system.
  6. Deploys two backend pods, one frontend, and one untrusted client in hubble-demo.

Wait for the script to finish successfully before continuing. The frontend starts generating requests automatically; you don’t need to run a separate traffic generator.

The Terraform network settings behind this deployment are:

network_profile {
  network_plugin      = "azure"
  network_plugin_mode = "overlay"
  network_data_plane  = "cilium"
  network_policy      = "cilium"

  advanced_networking {
    observability_enabled = true
    security_enabled      = true
  }
}

The demo also sets advancedNetworkPolicies: L7 using azapi_update_resource (API 2025-10-01). Layer 4 (L4) rules match a protocol and port, such as TCP 8080. Layer 7 (L7) rules can also match HTTP details such as GET /headers. On AKS, this mode also supports rules for fully qualified domain names (FQDNs) such as api.github.com.

The deployment handles both settings. You do not need to run a separate az aks update command or install Cilium with Helm.

Step 5: Check the Cluster Before Applying Policies

Read the resource names from Terraform and confirm ACNS is enabled:

export RESOURCE_GROUP="$(terraform -chdir=terraform output -raw resource_group_name)"
export CLUSTER_NAME="$(terraform -chdir=terraform output -raw cluster_name)"

az aks show -g "$RESOURCE_GROUP" -n "$CLUSTER_NAME" \
  --query 'networkProfile.advancedNetworking' -o json

Look for observability and security set to enabled: true, with advancedNetworkPolicies: L7. Then check Kubernetes:

kubectl config current-context

Confirm that this is the cluster you just deployed before running the remaining commands:

kubectl get nodes
kubectl -n kube-system get pods \
  -l 'k8s-app in (cilium,hubble-relay,hubble-ui)'
kubectl -n hubble-demo get pods,svc
kubectl -n hubble-demo get cnp,networkpolicy
kubectl get ccnp

The nodes should be Ready, the listed pods should be running and ready, and the backend Service should expose port 80. A fresh lab has no demo network policies yet. If you are repeating the guide on an existing lab, inspect any listed policies before proceeding; they can change the results.

Access Hubble CLI and Hubble UI

Step 1: Start the Local Connections

In terminal 1, stay in the demo directory and run:

./hubble-connect.sh

Leave this terminal running while you work through the scenarios.

The helper reads the client certificate and key from the hubble-relay-client-certs Secret, saves them privately in .certs, and configures Hubble CLI. The CLI and Relay check each other’s certificates before sharing flows; this is called mutual TLS (mTLS).

It also opens two local port-forwards:

  • Hubble CLI: localhost:4245 connects to the cluster’s hubble-relay:443.
  • Hubble UI: localhost:12000 connects to the cluster’s hubble-ui:80.

These connections listen only on your machine. You don’t need to expose Relay or the UI through a public LoadBalancer.

Step 2: Verify Hubble CLI Access

Open terminal 2 in the same demo directory and run:

hubble status
hubble observe -n hubble-demo --last 20

Example status:

Healthcheck (via localhost:4245): Ok
Current/Max Flows: 8,190/8,190 (100.00%)
Flows/s: 125.35
Connected Nodes: 2/2

Connected Nodes: 2/2 means Relay can see both lab nodes. 100.00% isn’t a disk-full warning: new flows replace the oldest ones. If you can’t find yesterday’s failure here, try the request again and watch for a new flow.

Use terminal 2 for the remaining commands, keeping its working directory at the demo folder so the policy file paths resolve correctly.

Do not continue if the health check fails or expected nodes are missing. Check that terminal 1 is still running and that the Relay pod is ready. A certificate or access error needs to be resolved before Hubble can read flows.

Step 3: Open Hubble UI

  1. Open http://localhost:12000 in your browser.
  2. Select the hubble-demo namespace.
  3. Leave the verdict filter on Any verdict to see the starting traffic.
  4. Find frontend, backend, and untrusted-client on the map.
  5. Select a workload to narrow the flows table, or select a flow row to inspect its details.

The UI is included in the deployment, using 00-hubble-ui.yaml. Its backend connects to Relay with mTLS and the server name ui.hubble-relay.cilium.io; the CLI helper uses instance.hubble-relay.cilium.io. The scripts and manifest configure these names for you.

The helper changes your local Hubble configuration. Keep .certs, private keys, kubeconfig, and raw credentials out of Git and screenshots. Use authorized, least-privilege access, and stop the port-forwards when finished.

Baseline: Establish What Works Before Changing Policy

The backend Service exposes port 80 and forwards to port 8080:

kubectl -n hubble-demo get svc backend \
  -o 'jsonpath={range .spec.ports[*]}port={.port} targetPort={.targetPort}{"\n"}{end}'
port=80 targetPort=8080

The frontend continuously calls three backend paths, two external HTTPS destinations, and a deliberately misspelled Service. Check its logs before adding policies:

kubectl logs -n hubble-demo deploy/frontend --tail=6
13:24:00 http://backend/get -> 200
13:24:00 http://backend/status/200 -> 200
13:24:00 http://backend/headers -> 200
13:24:01 https://api.github.com/zen -> 403
13:24:01 https://www.microsoft.com -> 200
13:24:01 http://backend-typo/get -> FAILED

In this example, two calls fail before we change anything: the typo returns FAILED, and GitHub returns 403. Your external API response may differ. Compare your own before-and-after results; a policy added later can’t explain a failure that was already there.

Hubble UI baseline service map showing frontend, untrusted-client, backend on port 8080, and the two external destinations, with forwarded flows in the table.

Both clients can reach the backend now. We keep untrusted-client running for comparison: after the fix, frontend should still get through, but untrusted-client should not.

The following commands and screenshots show example results. Your pod names, identities, IP addresses, and timestamps will differ.

Scenario 1: The Policy Allows the Wrong Port

Symptom and Broken Configuration

The goal is simple: allow only frontend to call backend. The mistake is using Service port 80 in the backend ingress rule.

Apply the deliberately broken policy:

kubectl apply -f kubernetes-manifests/02-scenario1-broken-policy.yaml

Its relevant rule is:

endpointSelector:
  matchLabels:
    app: backend
ingress:
  - fromEndpoints:
      - matchLabels:
          app: frontend
    toPorts:
      - ports:
          - port: "80"
            protocol: TCP

Now the frontend logs show:

13:26:03 http://backend/get -> FAILED
13:26:06 http://backend/status/200 -> FAILED
13:26:09 http://backend/headers -> FAILED

The demo script prints FAILED when curl exits unsuccessfully. That alone does not distinguish a DNS failure from a connection timeout.

Read the Dropped Connection

hubble observe -n hubble-demo \
  --from-label app=frontend --to-label app=backend \
  --verdict DROPPED --last 20

hubble observe -n hubble-demo \
  --to-label app=backend --type policy-verdict --last 20

Example matching flows:

Dec  5 13:26:00.472: hubble-demo/frontend-54dbdfd95-hqqfk:57700 (ID:7367) <> hubble-demo/backend-644f8d985-bz98l:8080 (ID:4240) policy-verdict:none INGRESS DENIED (TCP Flags: SYN)
Dec  5 13:26:00.472: hubble-demo/frontend-54dbdfd95-hqqfk:57700 (ID:7367) <> hubble-demo/backend-644f8d985-bz98l:8080 (ID:4240) Policy denied DROPPED (TCP Flags: SYN)

Read the first line from left to right. The frontend sent a SYN, the first step in opening a TCP connection. It was going to backend:8080. INGRESS DENIED means the backend’s incoming rule stopped it before there could be an HTTP response.

Why 8080 when the frontend called port 80? The frontend calls the Service on 80. The Service sends that connection to the pod on 8080. The policy protects the pod, so 8080 is the port its rule must allow. Don’t change the Service or the frontend URL.

In Hubble UI, select Dropped in the verdict menu. The table shows both clients’ denied traffic to backend port 8080:

Hubble UI filtered to dropped flows, showing frontend and untrusted-client traffic denied to the backend on port 8080.

Look at the Verdict column, not just the color of the line on the map.

Change the Port and Test Both Clients

kubectl apply -f kubernetes-manifests/03-scenario1-fixed-policy.yaml

The fixed manifest keeps the same policy name, backend-ingress, and changes the allowed TCP port to "8080".

Frontend requests recover:

13:27:14 http://backend/get -> 200
13:27:14 http://backend/status/200 -> 200
13:27:14 http://backend/headers -> 200

Check allowed and denied traffic separately:

hubble observe -n hubble-demo \
  --from-label app=frontend --to-label app=backend \
  --verdict FORWARDED --last 10

hubble observe -n hubble-demo \
  --from-label app=untrusted-client --to-label app=backend \
  --verdict DROPPED --last 10
Dec  5 13:27:07.595: hubble-demo/frontend-54dbdfd95-hqqfk:58982 (ID:7367) -> hubble-demo/backend-644f8d985-bz98l:8080 (ID:4240) policy-verdict:L3-L4 INGRESS ALLOWED (TCP Flags: SYN)
Dec  5 13:27:07.660: hubble-demo/untrusted-client-f89b7d995-n6nqk:60302 (ID:11167) <> hubble-demo/backend-644f8d985-bz98l:8080 (ID:4240) Policy denied DROPPED (TCP Flags: SYN)

Hubble UI after correcting the ingress port, with frontend traffic forwarded and untrusted-client traffic still dropped.

The first line says INGRESS ALLOWED for frontend; the second says Policy denied for untrusted-client. The fix opened the right port for the right client, not for everyone.

Scenario 2: Separate DNS Failure from Egress Denial

Leave the fixed backend ingress policy in place. Now restrict frontend egress to:

  • CoreDNS on port 53, including DNS inspection.
  • Backend pods on TCP 8080.
  • api.github.com on TCP 443.
kubectl apply -f kubernetes-manifests/04-scenario2-fqdn-egress-policy.yaml

The complete policy is:

apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: frontend-egress
  namespace: hubble-demo
spec:
  endpointSelector:
    matchLabels:
      app: frontend
  egress:
    - toEndpoints:
        - matchLabels:
            k8s:io.kubernetes.pod.namespace: kube-system
            k8s-app: kube-dns
      toPorts:
        - ports:
            - port: "53"
              protocol: ANY
          rules:
            dns:
              - matchPattern: "*"
    - toEndpoints:
        - matchLabels:
            app: backend
      toPorts:
        - ports:
            - port: "8080"
              protocol: TCP
    - toFQDNs:
        - matchName: api.github.com
      toPorts:
        - ports:
            - port: "443"
              protocol: TCP

Think of this as two permissions. Can I look up a name? Yes: rules.dns lets the frontend ask CoreDNS about any name. Cilium sees the answers, so it knows which addresses belong to an allowed name. Can I connect to that address? For an external site, the rule allows only api.github.com on port 443. Looking up www.microsoft.com does not give the frontend permission to connect to it.

Case A: A Name That Does Not Exist

Query responses to the frontend:

hubble observe -n hubble-demo \
  --to-label app=frontend --protocol dns --last 120

Example DNS response:

Dec  5 13:28:15.263: hubble-demo/frontend-54dbdfd95-hqqfk:39650 (ID:7367) <- kube-system/coredns-5bf45f87d-6d7ss:53 (ID:52687) dns-response proxy FORWARDED (DNS Answer RCode: Non-Existent Domain TTL: 4294967295 (Proxy backend-typo.hubble-demo.svc.cluster.local. A))

CoreDNS answered: Non-Existent Domain (NXDOMAIN) means “I don’t have a record for that name.” FORWARDED describes the DNS reply, not a successful lookup. The Service is named backend, not backend-typo. Fix the caller’s spelling rather than opening a port.

Test the correct fully qualified Service name:

kubectl exec -n hubble-demo deploy/frontend -- \
  curl -sS --max-time 5 -o /dev/null \
  -w 'Correct service FQDN -> %{http_code}\n' \
  http://backend.hubble-demo.svc.cluster.local./get
Correct service FQDN -> 200

Check the whole name in the answer. A pod may first try api.github.com with a cluster suffix such as .svc.cluster.local and get NXDOMAIN. It can then try api.github.com on its own and get an address. The first answer alone doesn’t mean GitHub is unreachable. The trailing dot in the test above tells DNS to use that exact name.

In the UI, DNS can be hidden by the Visual → Hide kube-dns:53 pod setting. Clear that option when investigating DNS; an empty map is not evidence that no DNS traffic exists.

Case B: The Name Resolves, but TCP Egress Is Denied

Look for an IPv4 answer for www.microsoft.com in the DNS flows. A successful lookup looks like this:

Dec  5 13:28:12.279: hubble-demo/frontend-54dbdfd95-hqqfk:33159 (ID:7367) <- kube-system/coredns-5bf45f87d-6d7ss:53 (ID:52687) dns-response standalone-proxy FORWARDED (DNS Answer "2.18.237.131" CNAMEs: "www.microsoft.com-c-3.edgekey.net.,e13678.dscb.akamaiedge.net." TTL: 5 (Query www.microsoft.com. A))

But that name is absent from the egress allowlist:

hubble observe --from-namespace hubble-demo \
  --to-fqdn www.microsoft.com --verdict DROPPED --last 10
Dec  5 13:27:54.354: hubble-demo/frontend-54dbdfd95-hqqfk:48866 (ID:7367) <> www.microsoft.com:443 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Dec  5 13:27:54.354: hubble-demo/frontend-54dbdfd95-hqqfk:48866 (ID:7367) <> www.microsoft.com:443 (world) Policy denied DROPPED (TCP Flags: SYN)

These lines come from different passes of the curl loop. One shows that DNS returned an address for www.microsoft.com. The other says EGRESS DENIED on port 443: the frontend wasn’t allowed to open the connection. Changing DNS won’t fix that.

Hubble UI dropped-flow filter showing frontend egress to www.microsoft.com on port 443 denied, alongside the expected untrusted-client ingress denial.

Compare the approved destination:

hubble observe --from-namespace hubble-demo \
  --to-fqdn api.github.com --verdict FORWARDED --last 10
Dec  5 13:27:53.866: hubble-demo/frontend-54dbdfd95-hqqfk:56768 (ID:7367) -> api.github.com:443 (ID:16777218) policy-verdict:L3-L4 EGRESS ALLOWED (TCP Flags: SYN)

If the application needs that site, add its name and port to the rule and test again. In this lab the block is intentional, so leave it in place.

CLI filter gotcha: On the tested CLI, -n/--namespace cannot be combined with --to-fqdn. Use --from-namespace instead. --namespace matches either endpoint, while the directional filter makes the source explicit.

Why GitHub Returned 403 Even Though Egress Was Allowed

In the example logs, the frontend received 403 from GitHub before any demo policies existed, and continued receiving it after the FQDN allow rule. If you see this, check the response headers:

kubectl exec -n hubble-demo deploy/frontend -- \
  curl -sS -D - -o /dev/null --max-time 5 https://api.github.com/zen |
  grep -Ei '^(HTTP/|x-ratelimit-(limit|remaining):)'
HTTP/2 403
x-ratelimit-limit: 60
x-ratelimit-remaining: 0

GitHub sent an HTTP reply, so the connection got through. x-ratelimit-remaining: 0 tells us the client had used up its request allowance. Opening the network policy further wouldn’t give it more requests. For a longer test, slow the loop down or use an endpoint you control.

Scenario 3: TCP Works, but an HTTP Path Is Denied

Keep the frontend egress policy from Scenario 2. Replace backend-ingress with an HTTP-aware rule:

kubectl apply -f kubernetes-manifests/05-scenario3-l7-http-policy.yaml
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
  name: backend-ingress
  namespace: hubble-demo
spec:
  endpointSelector:
    matchLabels:
      app: backend
  ingress:
    - fromEndpoints:
        - matchLabels:
            app: frontend
      toPorts:
        - ports:
            - port: "8080"
              protocol: TCP
          rules:
            http:
              - method: GET
                path: "/get"
              - method: GET
                path: "/status/.*"

The rule allows GET /get and any GET path beginning with /status/, such as /status/200. It doesn’t allow GET /headers.

Notice the policy name is still backend-ingress. Applying this file updates the old rule. Giving it a new name would leave the old, broader allow rule in place, and that rule could still let /headers through.

Compare the Application Result with HTTP Flows

The frontend now reports:

13:28:56 http://backend/get -> 200
13:28:56 http://backend/status/200 -> 200
13:28:56 http://backend/headers -> 403

Move from TCP observations to HTTP:

hubble observe -n hubble-demo --protocol http --last 30
hubble observe -n hubble-demo --http-status 403 --last 10
hubble observe -n hubble-demo --protocol http --verdict DROPPED --last 10

Example request/response pairs:

Dec  5 13:28:56.354: hubble-demo/frontend-54dbdfd95-hqqfk:59660 (ID:7367) -> hubble-demo/backend-644f8d985-bz98l:8080 (ID:4240) http-request FORWARDED (HTTP/1.1 GET http://backend/get)
Dec  5 13:28:56.356: hubble-demo/frontend-54dbdfd95-hqqfk:59660 (ID:7367) <- hubble-demo/backend-644f8d985-bz98l:8080 (ID:4240) http-response FORWARDED (HTTP/1.1 200 2ms (GET http://backend/get))
Dec  5 13:28:56.646: hubble-demo/frontend-54dbdfd95-hqqfk:59688 (ID:7367) -> hubble-demo/backend-644f8d985-fjvkh:8080 (ID:4240) http-request DROPPED (HTTP/1.1 GET http://backend/headers)
Dec  5 13:28:56.646: hubble-demo/frontend-54dbdfd95-hqqfk:59688 (ID:7367) <- hubble-demo/backend-644f8d985-fjvkh:8080 (ID:4240) http-response FORWARDED (HTTP/1.1 403 0ms (GET http://backend/headers))

The last two lines have the same client port (59688) and path (/headers). Read them as a pair:

  1. Request → backend: the connection opened, but Cilium’s HTTP proxy rejected GET /headers before the backend application handled it. That’s http-request DROPPED.
  2. Reply ← backend: the proxy sent 403 Forbidden back to the frontend. That’s http-response FORWARDED. The error got through; the request didn’t.

Filtering for drops alone hides the second line. In Scenario 1 the client never opened a connection. Here it got an answer explaining the refusal.

In the UI, select backend to narrow the flows, then select the /headers request in the L7 info column:

Hubble UI showing backend HTTP paths and a selected GET /headers request with a dropped ingress verdict in the Flow Details panel.

The selected UI row shows the denied request. Let’s read the other half of that exchange: what does Hubble record when the proxy sends the error back?

Read One Complete HTTP Flow in JSON

Run this while the HTTP rule is active and the frontend is making requests:

hubble observe -n hubble-demo --protocol http --last 1 -o json

This asks Relay for the latest HTTP observation in hubble-demo. On this CLI, --last 1 applies per connected Hubble instance, so you may get more than one JSON object, one per line. If nothing prints, check hubble status, generate a fresh request, and confirm the HTTP rule covers it.

The example below is one response to GET /headers. Start with these fields rather than reading every label:

  • What happened? flow.l7.type is RESPONSE and flow.l7.http.code is 403. flow.verdict is FORWARDED: the proxy sent the refusal back. This record describes the reply; the dropped request is a separate record.
  • Who sent what to whom? flow.source is the backend endpoint and flow.destination is the frontend. Under flow.l4.TCP, port 8080 is the source and 38204 is the client’s temporary port. The order is reversed from the request because this is the trip back.
  • Where did the rule apply? traffic_direction: INGRESS refers to the backend’s incoming policy. It doesn’t mean the reply was traveling toward the backend. is_reply: true tells you which half of the conversation you’re reading.
  • When and how long? flow.time is the UTC timestamp. latency_ns is 161599 nanoseconds, about 0.16 milliseconds. The short Summary displays whole milliseconds, so it shows 0ms, not an actual zero wait.
Expand full JSON response Collapse full JSON response

This record includes the pod labels, node labels, ports, and HTTP headers. No fields or list entries were removed. Private addresses, infrastructure identifiers, and the request ID are masked with [REDACTED]. Your cluster may report different fields or return a request instead of a response.

{
  "flow": {
    "time": "2026-12-05T13:49:11.650921797Z",
    "uuid": "3f871af1-4846-42ba-89d9-993e4ac23bf5",
    "verdict": "FORWARDED",
    "IP": {
      "source": "[REDACTED]",
      "destination": "[REDACTED]",
      "ipVersion": "IPv4"
    },
    "l4": {
      "TCP": { "source_port": 8080, "destination_port": 38204 }
    },
    "source": {
      "ID": 1399,
      "identity": 4240,
      "cluster_name": "akshubbledemo",
      "namespace": "hubble-demo",
      "labels": [
        "k8s:app=backend",
        "k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=hubble-demo",
        "k8s:io.cilium.k8s.policy.cluster=akshubbledemo",
        "k8s:io.cilium.k8s.policy.serviceaccount=default",
        "k8s:io.kubernetes.pod.namespace=hubble-demo"
      ],
      "pod_name": "backend-644f8d985-bz98l",
      "workloads": [{ "name": "backend", "kind": "Deployment" }]
    },
    "destination": {
      "ID": 3189,
      "identity": 7367,
      "cluster_name": "akshubbledemo",
      "namespace": "hubble-demo",
      "labels": [
        "k8s:app=frontend",
        "k8s:io.cilium.k8s.namespace.labels.kubernetes.io/metadata.name=hubble-demo",
        "k8s:io.cilium.k8s.policy.cluster=akshubbledemo",
        "k8s:io.cilium.k8s.policy.serviceaccount=default",
        "k8s:io.kubernetes.pod.namespace=hubble-demo"
      ],
      "pod_name": "frontend-54dbdfd95-hqqfk",
      "workloads": [{ "name": "frontend", "kind": "Deployment" }]
    },
    "Type": "L7",
    "node_name": "akshubbledemo/[REDACTED]",
    "node_labels": [
      "agentpool=system",
      "beta.kubernetes.io/arch=amd64",
      "beta.kubernetes.io/instance-type=Standard_D4s_v3",
      "beta.kubernetes.io/os=linux",
      "failure-domain.beta.kubernetes.io/region=northeurope",
      "failure-domain.beta.kubernetes.io/zone=0",
      "kubernetes.azure.com/agentpool=system",
      "kubernetes.azure.com/azure-cni-overlay=true",
      "kubernetes.azure.com/ca-hash=",
      "kubernetes.azure.com/cluster=[REDACTED]",
      "kubernetes.azure.com/consolidated-additional-properties=[REDACTED]",
      "kubernetes.azure.com/ebpf-dataplane=cilium",
      "kubernetes.azure.com/kubelet-identity-client-id=[REDACTED]",
      "kubernetes.azure.com/kubelet-serving-ca=cluster",
      "kubernetes.azure.com/localdns-state=disabled",
      "kubernetes.azure.com/mode=system",
      "kubernetes.azure.com/network-name=[REDACTED]",
      "kubernetes.azure.com/network-policy=cilium",
      "kubernetes.azure.com/network-resourcegroup=[REDACTED]",
      "kubernetes.azure.com/network-stateless-cni=true",
      "kubernetes.azure.com/network-subnet=[REDACTED]",
      "kubernetes.azure.com/network-subscription=[REDACTED]",
      "kubernetes.azure.com/node-image-version=AKSUbuntu-2404gen2containerd-202611.13.0",
      "kubernetes.azure.com/nodenetwork-vnetguid=[REDACTED]",
      "kubernetes.azure.com/nodepool-type=VirtualMachineScaleSets",
      "kubernetes.azure.com/os-sku-effective=Ubuntu2404",
      "kubernetes.azure.com/os-sku-requested=Ubuntu",
      "kubernetes.azure.com/os-sku=Ubuntu",
      "kubernetes.azure.com/podnetwork-type=overlay",
      "kubernetes.azure.com/priority=regular",
      "kubernetes.azure.com/role=agent",
      "kubernetes.azure.com/sku-cpu=4",
      "kubernetes.azure.com/sku-memory=16384",
      "kubernetes.azure.com/storageprofile=managed",
      "kubernetes.azure.com/storagetier=Premium_LRS",
      "kubernetes.io/arch=amd64",
      "kubernetes.io/hostname=[REDACTED]",
      "kubernetes.io/os=linux",
      "node.kubernetes.io/instance-type=Standard_D4s_v3",
      "storageprofile=managed",
      "storagetier=Premium_LRS",
      "topology.disk.csi.azure.com/zone=",
      "topology.kubernetes.io/region=northeurope",
      "topology.kubernetes.io/zone=0"
    ],
    "l7": {
      "type": "RESPONSE",
      "latency_ns": "161599",
      "http": {
        "code": 403,
        "method": "GET",
        "url": "http://backend/headers",
        "protocol": "HTTP/1.1",
        "headers": [
          { "key": "Content-Length", "value": "15" },
          { "key": "Content-Type", "value": "text/plain" },
          { "key": "X-Request-Id", "value": "[REDACTED]" }
        ]
      }
    },
    "reply": true,
    "event_type": { "type": 129 },
    "traffic_direction": "INGRESS",
    "is_reply": true,
    "Summary": "HTTP/1.1 403 0ms (GET http://backend/headers)"
  },
  "node_name": "akshubbledemo/[REDACTED]",
  "time": "2026-12-05T13:49:11.650921797Z"
}

source.labels and destination.labels help you match these pods to a policy selector such as app: backend. node_name and node_labels describe where Hubble saw the flow, not another application in the request path. Under l7.http, headers are the HTTP headers Hubble recorded; this is not a copy of the response body.

What to Change If the Path Should Work

If /headers should be allowed, add that exact method/path to the reviewed HTTP policy and retest. If the intent is to return to the earlier L4-only policy for the lab:

kubectl apply -f kubernetes-manifests/03-scenario1-fixed-policy.yaml

That restores the earlier rule: the frontend can reach the backend on 8080 regardless of path, and the untrusted client still can’t connect.

Visibility limitation: the demo backend uses plaintext HTTP. Hubble does not automatically decrypt arbitrary HTTPS traffic. Seeing external TCP 443 flows does not expose encrypted URL paths or response status codes; that is why the GitHub rate-limit check used curl.

A Repeatable Troubleshooting Workflow

  1. Start with the caller. Note the URL, time, and exact error. Run hubble status, then find the caller and its destination in Hubble UI.
  2. Repeat one request. Check the port and verdict on the new flow. If the connection never opened, look for a policy drop. If the name didn’t resolve, look at DNS replies. If the client got a status code, look at HTTP requests and responses.
  3. Test the smallest fix. Repeat the failed call. Then try a call that should stay blocked, to make sure the rule didn’t open more access than intended.

Pick the command that matches your question:

hubble observe -n hubble-demo --since 1m
hubble observe -n hubble-demo --verdict DROPPED --last 20
hubble observe -n hubble-demo --protocol dns --last 50
hubble observe -n hubble-demo --protocol http --last 30
hubble observe -n hubble-demo --follow
hubble observe -n hubble-demo --protocol http --last 1 -o json

Run these separately. --follow keeps watching until you press Ctrl+C.

If you need yesterday’s flows, set up stored network logs in advance. The CLI reads recent observations, not a permanent packet history. If Hubble shows traffic leaving a pod but the caller still times out, check the next hop: an Azure network security group, firewall, route, or the remote service itself. Before sharing a flow, check its URLs, headers, addresses, and labels for private information.

For broader ACNS context, see Advanced Container Networking Services on AKS.

Clean Up the Demo

Option 1: Reset the Scenarios and Keep the Cluster

To return a fresh lab to its starting state, remove only the two policies created by the scenarios. Confirm your Kubernetes context first:

kubectl config current-context

Then reset the demo policies:

kubectl -n hubble-demo delete cnp \
  backend-ingress frontend-egress --ignore-not-found
kubectl -n hubble-demo get cnp,networkpolicy
ciliumnetworkpolicy.cilium.io "backend-ingress" deleted
ciliumnetworkpolicy.cilium.io "frontend-egress" deleted
No resources found in hubble-demo namespace.

Allow a few seconds for the change to take effect, then check the apps:

kubectl -n hubble-demo get pods
kubectl -n hubble-demo logs deploy/frontend --tail=6
kubectl -n hubble-demo logs deploy/untrusted-client --tail=3

The frontend should regain access to all three backend paths and to the external Microsoft site. Example frontend output:

13:30:35 http://backend/get -> 200
13:30:35 http://backend/status/200 -> 200
13:30:35 http://backend/headers -> 200
13:30:35 https://api.github.com/zen -> 403
13:30:36 https://www.microsoft.com -> 200
13:30:36 http://backend-typo/get -> FAILED

The untrusted client should also reach the backend again:

13:30:26 http://backend/get -> 200
13:30:31 http://backend/get -> 200
13:30:36 http://backend/get -> 200

The deliberate typo will still fail, and GitHub may still return a rate-limit response. Those are not signs of failed cleanup.

Press Ctrl+C in terminal 1 to stop the local connections. This option leaves AKS, Hubble UI, and the workloads running, so Azure charges continue. If the namespace had policies before you started, restore those policies rather than deleting them.

Option 2: Delete the Disposable Lab

When you no longer need the lab, stop the local connections and return to the same demo directory and Terraform state used for deployment. Select the same Azure subscription and set the provider’s subscription variable in that shell:

az account set --subscription "<subscription-id-or-name>"
export ARM_SUBSCRIPTION_ID="$(az account show --query id --output tsv)"
./cleanup.sh

This deletes the Terraform-managed Azure resources, including the AKS cluster. The script asks you to confirm before destroying the lab. It also removes the local cluster context, Hubble certificates, and Terraform state and provider files. Use it only for the disposable environment created by this guide, not just to reset a scenario.

Takeaway

The value of Hubble is not just that it draws a network map. It lets you distinguish failures that look nearly identical from the application:

  • Wrong backend port: an ingress policy denies the TCP SYN to 8080.
  • Misspelled Service: DNS returns NXDOMAIN even though the response is forwarded.
  • Unapproved external dependency: DNS succeeds, but egress to TCP 443 is denied.
  • Disallowed HTTP path: the request is dropped at L7 and a 403 response is forwarded.
  • Remote API rate limit: connectivity is allowed, but the remote endpoint returns its own 403.

Start with a baseline, change one thing, correlate the UI with precise CLI evidence, and verify both the recovered path and the boundary that should remain blocked.

References

Found this helpful?
Back to all posts