Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Hosted agent on your own AKS cluster is currently in PREVIEW. See the Supplemental Terms of Use for Microsoft Azure Previews for legal terms that apply to Azure features that are in beta, preview, or otherwise not yet released into general availability.
When you use customer-managed AKS hosting, Foundry Agent Service remains the service entry point while the agent workload and supporting resources run in your Azure environment. This article explains how those resources work together under the hood.
Note
For supported versions, required settings, permissions, and resource configuration, see Prerequisites and AKS requirements.
Architecture overview
Customer-managed AKS hosting separates the Foundry service plane from the customer-operated workload plane. Foundry Agent Service remains the supported endpoint for deploying, versioning, authenticating, and invoking agents. The agent containers run as Kubernetes workloads in your AKS cluster.
Foundry-managed components connect the service plane to the cluster. They translate agent deployments into Kubernetes resources and route invocation requests to the selected workload. Azure operates the AKS control plane, while you operate the node pools, capacity, network, policies, and supporting Azure resources.
At runtime, an invocation enters through Foundry Agent Service and is routed to the agent workload. The workload then uses its identity and customer-configured network paths to call models, tools, data sources, and telemetry destinations. The following sections explain these boundaries and resources in more detail.
Network flows
Network architecture diagram
The network architecture spans three operational domains. Foundry handles service-level orchestration and invocation. You operate the AKS workload environment and its network paths. Azure Kubernetes Service operates the cluster control plane.
Figure 1. Network ownership boundaries and connection flows for Foundry hosted agents on customer-managed AKS.
Interaction flow
A client invokes a hosted agent through Foundry Agent Service. Foundry routes the authenticated request through the delegated subnet and private agent ingress to the target agent.
An application running in AKS invokes agent A through Foundry Agent Service instead of addressing the agent pod directly.
Agent A invokes agent B through Foundry Agent Service instead of using direct pod-to-pod addressing.
Agent workloads use customer-managed network paths to call private MCP tools, access storage and databases, and send telemetry to Azure Monitor.
Responses return through the corresponding path in the opposite direction. Separately, the Foundry controller communicates with the Kubernetes API server to create and maintain agent workloads.
DNS, routing tables, peering, firewalls, and network security groups determine whether the components and endpoints in these flows can resolve and reach their intended addresses.
Identity boundaries
Separate identities keep user operations, platform management, image pulls, and workload data access isolated.
Operator identity
The person or automation onboarding the cluster creates the hosting configuration and deploys agents through Foundry. This identity operates at the Foundry and Azure resource layers; it is not the runtime identity of an agent pod.
Hosting identity
Foundry uses the hosting identity to integrate with AKS and manage Foundry-owned Kubernetes components. This identity belongs to the hosting control path and should remain separate from agent workload access.
AKS kubelet identity
The kubelet identity authenticates the node when Kubernetes pulls an agent image from Azure Container Registry. The agent container does not pull its own deployment image after it starts.
Workload identity
Agent pods use workload identity federation to access permitted Azure resources without embedding credentials in the image. The resources available to an agent depend on the identity and authorization assigned to that workload.
Internal TLS and certificate management
Foundry secures traffic between Foundry-managed components in your AKS cluster with mutual TLS (mTLS) backed by an isolated, cluster-local PKI. External Azure, Microsoft Entra ID, and Kubernetes API trust chains remain separate and unchanged.
Foundry generates, distributes, and rotates all internal certificates automatically—you don't need to provision or renew them manually.
Certificate lifecycle and rotation
Foundry manages two cluster-local certificate authorities (CAs) and short-lived leaf certificates that rotate automatically ahead of expiration without interrupting active workloads:
| Certificate scope | Typical lifetime | Rotation behavior |
|---|---|---|
| Internal workload CA | About 1 year | Rotates automatically ahead of expiry using dual-root overlap so active components trust both roots before signing switches over. |
| Platform component leaf certificates | About 7 days | Renewed automatically ahead of expiry and reloaded in place. |
| Per-sandbox leaf certificates | About 24 hours | Issued per sandbox without shared private keys, renewed automatically ahead of expiry, and reloaded without restarting the agent workload. |
| Egress inspection CA | About 1 year | Managed separately from internal mTLS for HTTPS egress controls, with overlapping dual-root rollover ahead of expiry. |
All internal component certificates are cluster-specific, use modern TLS (TLS 1.3 for platform component traffic; TLS 1.2 or TLS 1.3 for sandbox ingress), and rotate on a schedule that can change over time. Treat all Foundry-managed certificates and trust bundles as platform-managed runtime state.
Operational constraints for internal certificates
Keep these constraints in mind when operating the cluster:
- Don't modify or delete Foundry-managed certificate resources: Leave certificate Secrets, trust ConfigMaps, and related metadata in Foundry-managed namespaces untouched. If authoritative CA state is deleted or corrupted, the platform fails closed instead of silently creating a new CA.
- Don't pin internal certificates or trust bundles: Never pin CA subjects, public keys, thumbprints, or leaf certificates in container images, snapshots, or custom policies. Any of these values can change on rotation and differ by cluster.
- Keep Kubernetes admission controls enabled: Foundry relies on built-in Kubernetes admission controls (included in the required AKS baseline) to restrict certificate access to authorized namespaces and workloads.
- Read the egress CA bundle dynamically in agent code: When HTTPS egress inspection is enabled, configure TLS clients in your hosted agent container to read the runtime-injected CA bundle from standard environment variables (
SSL_CERT_FILE,REQUESTS_CA_BUNDLE,GRPC_DEFAULT_SSL_ROOTS_FILE_PATH, orNODE_EXTRA_CA_CERTS). For code examples and client constraints, see Certificate handling in hosted agent guardrails.
Container registry and image pulls
Figure 2. Container image deployment and pull flow for hosted agents on customer-managed AKS.
Supported registries
AKS registry integration supports image pulls through the built-in kubelet credential provider for Azure Container Registry. Cross-subscription registries are supported.
Third-party registries, such as JFrog Artifactory, and self-hosted registries, such as Harbor, require a native Kubernetes kubelet credential provider installed and configured on every eligible sandbox node before the cluster is onboarded to Foundry. For example, see JFrog Kubelet Credential Provider: Azure AKS setup guide. Foundry does not create, store, rotate, or manage registry credentials.
For any private registry, every eligible AKS node requires DNS resolution, routing, firewall access, TLS trust, and connectivity to the registry and any identity or token-exchange endpoints. These paths are used to obtain credentials and pull image manifests and layers.
How an image reaches the cluster
A developer or CI pipeline builds and tests the agent container, then pushes the image to Azure Container Registry, a third-party registry such as JFrog Artifactory, or a self-hosted registry such as Harbor.
The deployment submits the fully qualified image URI to Foundry Agent Service.
Foundry Agent Service creates or updates the Kubernetes workload with the submitted image reference through the Kubernetes API server.
The Kubernetes control plane schedules the agent pod on an eligible AKS node, where the kubelet and container runtime handle the image pull and container startup.
The kubelet obtains registry credentials through the selected credential provider. With AKS registry integration, the kubelet uses the built-in kubelet credential provider for Azure Container Registry. Third-party and self-hosted registries use the credential provider configured on the node to return the required short-lived registry token.
The kubelet and node container runtime pull the image manifest and layers from Azure Container Registry, a third-party registry, or a self-hosted registry, cache the image layers, and start the agent container. The agent workload identity becomes available only after the pod starts and is separate from image-pull authentication.
Storage used by the AKS hosting integration
The storage account associated with customer-managed AKS hosting supports the hosting integration. It is separate from storage that an agent application uses for its own business data.
What the hosting storage account contains
The hosting storage account stores an archive of each agent session's HOME directory. The sandbox-agent sidecar creates and restores the snapshot so the session can continue across suspend and resume. Because many agent frameworks write session data to HOME, the snapshot can contain session and filesystem data. The snapshot lifecycle is bound to the agent session.
How this differs from bring-your-own resources
This hosting storage account is not the bring-your-own storage described in Use your own resources in the Foundry Agent Service. That feature replaces platform-managed data resources for files, conversations, and vector stores in a standard Agent Service setup.
An agent can also connect to separate customer databases or storage accounts for application data. Those resources are selected by the agent application and aren't replaced by the storage account used by the AKS hosting integration.
Telemetry flow
Figure 3. End-to-end OpenTelemetry flow from an agent on customer-managed AKS to observability back ends.
Agent workloads can send OpenTelemetry signals through a collector to one or more observability back ends. Separately, Foundry Agent Service records automatic server-side invocation telemetry and sends those service-side traces to the Application Insights resource connected to the Foundry project.
Agent code, APIs, and SDKs create traces, metrics, and logs in the agent pod.
The OpenTelemetry SDK or hosting libraries send telemetry to the OpenTelemetry Collector by using OTLP. When configured, hosting libraries can also export traces directly to Application Insights.
The OpenTelemetry Collector receiver accepts OTLP telemetry. Its processors can batch, filter, enrich, and route traces, logs, and metrics to one or more configured exporters.
The collector exporters send each signal to its configured back end over supported protocols and customer-managed network paths. Customer DNS, routing, firewalls, proxies, private endpoints, and egress policies determine which back ends the exporters can reach.
The configured back ends ingest and store the telemetry for query, visualization, dashboards, and alerts. Supported destinations can include Prometheus, third-party observability platforms such as Datadog or New Relic, and Azure Monitor. Azure Monitor delivers telemetry to Application Insights and Log Analytics.
Customer network controls apply to telemetry exported from AKS, including collector exports and direct hosting-library exports. Azure Monitor traffic can use the public ingestion endpoint or private connectivity through Azure Monitor Private Link Scope (AMPLS), depending on the network design. Connect Application Insights to the Foundry project to inspect and correlate Foundry service-side invocation traces with agent telemetry.
Management boundary
Customer-managed AKS hosting keeps the Foundry agent experience but changes who operates the underlying infrastructure. Foundry continues to manage the agent service and platform capabilities. You manage the cluster and the Azure resources that support it. The following table compares the management boundary for Foundry-managed hosting with customer-managed AKS hosting.
| Area | Foundry-managed hosting | Customer-managed AKS hosting |
|---|---|---|
| Compute platform | Microsoft provisions and operates the hosting infrastructure. | You provision and operate the AKS cluster, node pools, and supporting resources. |
| Agent service | Foundry manages deployment, versions, authentication, routing, and invocation. | Foundry manages the same service entry point and integrates it with the workload in your cluster. |
| Runtime and sessions | Microsoft operates the runtime infrastructure that provides scaling and session isolation. | Foundry-managed components provide the agent runtime; you provide healthy cluster capacity for it to run. |
| Capacity and quotas | Microsoft manages hosting capacity, subject to applicable Foundry service limits. | Responsibility is shared. Foundry service limits apply, and you manage Azure subscription quotas, node capacity, and cluster scaling. |
| Networking | Microsoft operates the hosting network. You configure access from the agent to your resources. | You manage the virtual network, DNS, private endpoints, routing, firewalls, and workload egress. |
| Monitoring and troubleshooting | Foundry captures system-component logs and, when Application Insights is configured, connects agent logs and request traces to that resource. | Foundry provides agent telemetry. You also monitor AKS nodes, Kubernetes resources, networking, registry, and storage. |
| Updates | Microsoft updates the hosting infrastructure and Foundry platform components. | Microsoft updates Foundry-managed components. You update AKS, node images, and customer-managed dependencies. |
| Security, compliance, and cost | Microsoft manages the hosting platform boundary. You manage agent configuration, data access, and service usage. | You also own cluster and workload compliance and pay for AKS, networking, registry, storage, and monitoring resources. |
What stays consistent
Both hosting options use Foundry Agent Service for agent deployment, versioning, authenticated invocation, per-agent identity, session isolation, tool integration, tracing, evaluation, and publishing. The supported capabilities are delivered by Foundry even when the workload runs in your cluster.
What becomes shared
With customer-managed AKS, service operation and infrastructure operation meet at the cluster boundary. Microsoft manages Foundry Agent Service and the Foundry-managed components installed in the cluster. You keep the cluster healthy, provide enough capacity, and operate its networking, security, compliance, and supporting Azure resources.
Related content
- Prerequisites and AKS requirements
- Quickstart: Deploy a hosted agent to AKS
- Troubleshoot bring your own AKS
- Use your own resources in the Foundry Agent Service