istio: Adding namespace to ambient mesh - onnection failed: deadline has elapsed ztunnel error

I’m trying to PoT ambient mesh on existing cluster which runs in sidecar mode by enabling ambient mesh and moving one namespace to it. Namespace has its own ingress gateway and one workload. Everything is working before I move it to ambient mode and fails right after. My config is below

Azure AKS v 1.30.6

k version
Client Version: v1.31.1
Kustomize Version: v5.4.2
Server Version: v1.30.6
istioctl version
client version: 1.20.8
control plane version: 1.24.4
data plane version: 1.24.4 (32 proxies)

Istio is installed by helm using flux helmreleases. Configs are below.

Istiod

values:
    cni:
      enabled: true
      excludeNamespaces:
      - kube-system
      - istio-system
      - istio-operator
      - istiod
      - istio-cni
    global:
      hub: *****.azurecr.io/istio
      istiod:
        enableAnalysis: true
      proxy:
        logLevel: error
        resources:
          limits:
            cpu: 2000m
            memory: 1024Mi
          requests:
            cpu: 100m
            memory: 128Mi
      tag: 1.24.4
    meshConfig:
      accessLogFile: /dev/stdout
      defaultConfig:
        proxyMetadata:
          ISTIO_META_DNS_AUTO_ALLOCATE: "true"
          ISTIO_META_DNS_CAPTURE: "true"
          ISTIO_META_ENABLE_HBONE: "true"
        tracing:
          sampling: 100
          zipkin:
            address: jaeger-collector.observability.svc.cluster.local:9411
      enableTracing: true
      extensionProviders:
      - envoyExtAuthzHttp:
          headersToDownstreamOnDeny:
          - set-cookie
          headersToUpstreamOnAllow:
          - authorization
          includeRequestHeadersInCheck:
          - cookie
          port: "80"
          service: oauth2-proxy.oauth2-proxy.svc.cluster.local
        name: oauth2-proxy
      h2UpgradePolicy: DO_NOT_UPGRADE
      outboundTrafficPolicy:
        mode: REGISTRY_ONLY
    pilot:
      autoscaleEnabled: true
      autoscaleMax: 5
      autoscaleMin: 2
      cni:
        enabled: true
      env:
        ENABLE_DEBUG_ON_HTTP: "true"
        ENABLE_INGRESS_WAYPOINT_ROUTING: "true"
        ENABLE_LEGACY_FSGROUP_INJECTION: "false"
        PILOT_ENABLE_AMBIENT: "true"
        PILOT_ENABLE_AMBIENT_WAYPOINTS: "true"
        PILOT_ENABLE_STATUS: "true"
      resources:
        limits:
          cpu: 1000m
          memory: 2048Mi
        requests:
          cpu: 500m
          memory: 1768Mi
      seccompProfile:
        type: RuntimeDefault
      spec:
        containers:
        - args:
          - discovery
          - --grpcAddr=

Istio cni

values:
    ambient:
      dnsCapture: "true"
      enabled: "true"
    excludeNamespaces:
    - kube-system
    - kube-public
    - kube-node-lease
    - calico-system
    - gatekeeper-system
    - tigera-operator
    - flux-system
    - operators
    - observability
    - cert-manager
    - akv2k8s
    - twistlock
    - external-secrets
    - keda
    - oauth2-proxy
    - kyverno
    global:
      hub: ****.azurecr.io/istio
      tag: 1.24.4

ztunnel is installed with default values from chart

Namespace config

Gateway service

apiVersion: v1
kind: Service
metadata:
  annotations:
    meta.helm.sh/release-name: ns-istio-test04-gw
    meta.helm.sh/release-namespace: ns-istio-test04
    service.beta.kubernetes.io/azure-load-balancer-internal: "true"
  creationTimestamp: "2025-01-22T19:51:10Z"
  finalizers:
  - service.kubernetes.io/load-balancer-cleanup
  labels:
    app: ns-istio-test04-gw
    app.kubernetes.io/instance: ns-istio-test04-gw
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: ns-istio-test04-gw
    app.kubernetes.io/part-of: istio
    app.kubernetes.io/version: 1.24.4
    helm.sh/chart: gateway-1.24.4
    helm.toolkit.fluxcd.io/name: ns-istio-test04-gw
    helm.toolkit.fluxcd.io/namespace: ns-istio-test04
    istio: ns-istio-test04-gw
  name: ns-istio-test04-gw
  namespace: ns-istio-test04
  resourceVersion: "198287932"
  uid: d9cfb55d-3d96-4471-9355-51c1792559eb
spec:
  allocateLoadBalancerNodePorts: true
  clusterIP: 172.29.204.183
  clusterIPs:
  - 172.29.204.183
  externalTrafficPolicy: Local
  healthCheckNodePort: 32449
  internalTrafficPolicy: Cluster
  ipFamilies:
  - IPv4
  ipFamilyPolicy: SingleStack
  loadBalancerIP: 10.53.112.58
  ports:
  - name: status-port
    nodePort: 30692
    port: 15021
    protocol: TCP
    targetPort: 15021
  - name: http2
    nodePort: 32004
    port: 80
    protocol: TCP
    targetPort: 80
  - name: https
    nodePort: 32480
    port: 443
    protocol: TCP
    targetPort: 443
  selector:
    app: ns-istio-test04-gw
    istio: ns-istio-test04-gw
  sessionAffinity: None
  type: LoadBalancer
status:
  loadBalancer:
    ingress:
    - ip: 10.53.112.58
      ipMode: VIP

Gateway resource

apiVersion: v1
items:
- apiVersion: networking.istio.io/v1
  kind: Gateway
  metadata:
    creationTimestamp: "2025-03-17T13:50:20Z"
    generation: 1
    labels:
      kustomize.toolkit.fluxcd.io/name: flux-system
      kustomize.toolkit.fluxcd.io/namespace: flux-system
    name: ns-istio-test04-gw
    namespace: ns-istio-test04
    resourceVersion: "182835589"
    uid: a0c81076-7e53-4059-934e-4fad2df5edfd
  spec:
    selector:
      istio: ns-istio-test04-gw
    servers:
    - hosts:
      - istio-test04.aks.com
      port:
        name: ns-istio-test04
        number: 443
        protocol: HTTPS
      tls:
        credentialName: ingress-cert
        mode: SIMPLE
kind: List
metadata:
  resourceVersion: ""

Virtual service\

apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
  name: ns-istio-test04-vs # Replace with a name relevant to your application
  namespace: ns-istio-test04 # Replace with namespace where you'd like to keep the resource
spec:
  hosts:
    - istio-test04.aks.com
  gateways:
    - ns-istio-test04-gw
  http:
    - match:
        - uri:
            prefix: /
      route:
        - destination:
            host: podinfo
            port:
              number: 8080

Auth policies

# AuthorizationPolicy to allow access of all the applications deployed within namesapce
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: auth-istio
  namespace: ns-istio-test04
spec:
  action: ALLOW
  rules:
  - from:
    - source:
        namespaces: ["ns-istio-test04"]
apiVersion: security.istio.io/v1beta1
kind: AuthorizationPolicy
metadata:
  name: auth-ingress
  namespace: ns-istio-test04
spec:
  action: ALLOW
  rules:
  - from:
    - source:
        ipBlocks:
        
        - 10.100.0.0/16
        - 10.200.0.0/16
  selector:
    matchLabels:
      istio: ns-istio-test04-gw

Simple podinfo app deployed into namespace.

When I initiate request to the ingress I see following in the logs of Gateway pod

2025-04-15T13:54:53.888Z] "GET /api/info HTTP/2" 503 UC upstream_reset_before_response_started{connection_termination} - "-" 0 95 10001 - "10.34.99.165" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" "71983127-9b1f-98db-bf4c-62d30d061da6" "istio-test04.aks.com" "envoy://connect_originate/172.29.1.188:9898" outbound|8080||podinfo.ns-istio-test04.svc.cluster.local envoy://internal_client_address/ 172.29.1.187:443 10.34.99.165:50997 istio-test04.aks.com -
[2025-04-15T13:54:56.885Z] "- - -" 0 UF,URX - - "-" 0 0 10001 - "-" "-" "-" "-" "172.29.1.188:15008" connect_originate - 172.29.1.188:9898 envoy://internal_client_address/ - -
[2025-04-15T13:54:56.885Z] "GET /api/info HTTP/2" 503 UC upstream_reset_before_response_started{connection_termination} - "-" 0 95 10001 - "10.34.99.165" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:137.0) Gecko/20100101 Firefox/137.0" "034eb6f2-b6c7-9051-b85f-5e82a8759853" "istio-test04.aks.com" "envoy://connect_originate/172.29.1.188:9898" outbound|8080||podinfo.ns-istio-test04.svc.cluster.local envoy://internal_client_address/ 172.29.1.187:443 10.34.99.165:50997 istio-test04.aks.com -

And following error in ztunnel

2025-04-15T14:04:58.474952Z    error    access    connection complete    src.addr=172.29.1.187:48284 src.workload="ns-istio-test04-gw-597fb9d557-2nrkf" src.namespace="ns-istio-test04" src.identity="spiffe://cluster.local/ns/ns-istio-test04/sa/ns-istio-test04-gw" dst.addr=172.29.0.172:15008 dst.hbone_addr=172.29.0.172:9898 dst.service="podinfo.ns-istio-test04.svc.cluster.local" dst.workload="podinfo-blue-7975c575bb-lt2tj" dst.namespace="ns-istio-test04" dst.identity="spiffe://cluster.local/ns/ns-istio-test04/sa/default" direction="inbound" bytes_sent=0 bytes_recv=0 duration="10001ms" error="connection failed: deadline has elapsed"

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 23 (11 by maintainers)

Most upvoted comments

Step-wise - you can probably do skip upgrade from 1.20 -> 1.22, verify that everything’s running correctly and then 1.22 -> 1.24. Keep in mind that upstream doesn’t officially support skip upgrades; the officail way to do this is to make 4 step by step upgrades: 1.20->1.21, 1.21->1.22, etc. But we do know of some users who are successful with skip upgrades

Ah interesting, that doesn’t surprise me; we don’t officially support a 4 version upgrade. If it works on a fresh install, I’m inclined to close the issue

@keithmattix I don’t. I have calico as network policy engine but there is no restrictive policies added.

I’m checking into this; I do think this may be the source of the problem

@keithmattix

would love to do slack, but won’t be productive as corp laptop has it blocked and from private one I won’t be be able to copy paste logs / configs.

these are fresh ones

ztunnel-lcvtw istio-proxy 2025-04-15T19:39:27.254247Z	info	hyper_util	listener established	address=[::]:15021 component="readiness"
ztunnel-lcvtw istio-proxy 2025-04-15T19:39:27.254441Z	info	hyper_util	listener established	address=127.0.0.1:15000 component="admin"
ztunnel-lcvtw istio-proxy 2025-04-15T19:39:27.254469Z	info	hyper_util	listener established	address=[::]:15020 component="stats"
ztunnel-lcvtw istio-proxy 2025-04-15T19:39:27.314164Z	info	proxy::inbound	listener established	address=[::]:15008 component="inbound" transparent=false
ztunnel-lcvtw istio-proxy 2025-04-15T19:39:27.314181Z	info	proxy::inbound_passthrough	listener established	address=[::]:15006 component="inbound plaintext" transparent=false
ztunnel-lcvtw istio-proxy 2025-04-15T19:39:27.314193Z	info	proxy::outbound	listener established	address=[::]:15001 component="outbound" transparent=false
ztunnel-lcvtw istio-proxy 2025-04-15T20:05:10.422706Z	info	proxy::inbound	listener established	address=[::]:15008 component="inbound" transparent=false
ztunnel-lcvtw istio-proxy 2025-04-15T20:05:10.422724Z	info	proxy::inbound_passthrough	listener established	address=[::]:15006 component="inbound plaintext" transparent=false
ztunnel-lcvtw istio-proxy 2025-04-15T20:05:10.422736Z	info	proxy::outbound	listener established	address=[::]:15001 component="outbound" transparent=false
ztunnel-wbcxn istio-proxy 2025-04-15T19:39:24.042795Z	info	hyper_util	listener established	address=[::]:15021 component="readiness"
ztunnel-wbcxn istio-proxy 2025-04-15T19:39:24.042942Z	info	hyper_util	listener established	address=127.0.0.1:15000 component="admin"
ztunnel-wbcxn istio-proxy 2025-04-15T19:39:24.042961Z	info	hyper_util	listener established	address=[::]:15020 component="stats"
ztunnel-wbcxn istio-proxy 2025-04-15T19:39:24.087552Z	info	proxy::inbound	listener established	address=[::]:15008 component="inbound" transparent=false
ztunnel-wbcxn istio-proxy 2025-04-15T19:39:24.087577Z	info	proxy::inbound_passthrough	listener established	address=[::]:15006 component="inbound plaintext" transparent=false
ztunnel-wbcxn istio-proxy 2025-04-15T19:39:24.087587Z	info	proxy::outbound	listener established	address=[::]:15001 component="outbound" transparent=false

The ones before trasparent mode was disabled are a pretty much the same except transparent=true

2025-04-15T13:54:30.062515Z	info	proxy::inbound_passthrough	listener established	address=[::]:15006 component="inbound plaintext" transparent=true
2025-04-15T14:03:45.656116Z	info	hyper_util	listener established	address=127.0.0.1:15000 component="admin"
2025-04-15T14:03:45.718722Z	info	proxy::inbound	listener established	address=[::]:15008 component="inbound" transparent=true