hostNetwork Pods that are subsequently created on Canary nodes and use the primary CNI will enter the Agent CNI path and obtain a Fake IP address. The host iptables forcibly converges DNS and TCP traffic to the node-local ZeroProxy, which enforces access policies, performs credential injection, verifies call identities, intercepts direct bypasses, and provides unified auditing.Deny by default.All traffic must pass through the proxy.Credentials are not injected into Agent Pods.Access processes are auditable.Node changes can be rolled out in a phased manner.Data plane failures can be rolled back.
Characteristic | Description |
Real CNI access | Agent CNI configures veth, the agentcni0 bridge, Fake IP address, default routes, and node-side iptables rules for subsequently created Pods that use the primary CNI on Canary nodes. |
Forced traffic convergence | UDP/53 traffic is redirected to the node DNS Proxy. TCP traffic is redirected to ZeroProxy, except for traffic that matches the Service CIDR and is marked for bypass. |
Default deny | Egress, Ingress, and Direct Bypass support default deny. Sensitive Metadata/CGNAT addresses have built-in deny protection. |
Credential isolation | Business Agent Pods do not mount credentials. Credentials are stored in Kubernetes Secrets and are read and injected by ZeroProxy during forwarding. |
Dynamic policy | AgentNetworkPolicy supports policy declarations. Controller updates ConfigMap and triggers ZeroProxy hot reload. |
Service compatibility | Service CIDR traffic is handed back to kube-proxy and the primary CNI using fwmark, avoiding impact on Kubernetes ClusterIP Service. |
Canary release and rollback | Only nodes with the Canary tag will have CNI installed. Node-level rollback and host residue check are provided. |
agent-cni-installer runs as a privileged DaemonSet and is scheduled only on Canary nodes. It installs the CNI binary, CNI configuration, bridge, sysctl settings, and iptables rules.zeroproxy runs as a hostNetwork DaemonSet and provides a local proxy on each Canary node.credential-upstreams provides protected upstreams for testing purposes to verify complete functionality. In production, replace them with real upstreams.agent-network-controller runs as a Deployment, watches AgentNetworkPolicy and AgentNetworkClass, and coordinates policies and basic CNI configurations.AgentNetworkPolicy, ConfigMap, and Secret carry policies, upstream addresses, and credential references.Agent Pod eth0(Fake IP)→ Default route→ agentcni0 bridge→ Host iptables PREROUTING├── UDP/53 → REDIRECT to ZeroProxy DNS :18053├── Service CIDR → Returned to kube-proxy/primary CNI after fwmark└── TCP → REDIRECT to ZeroProxy :18080→ Policy matching, identity verification, credential injection, and auditing→ Target service
InstallAddon API. However, because the component modifies the CNI, bridge, and iptables on target nodes, you must still follow the canary process of "single-node Canary → dual-node Canary → rollback residual check."Concept | Description |
Agent workload | Newly created Pods that are scheduled to Canary nodes with Agent CNI enabled and require network governance. Dedicated Canary nodes are currently used as the isolation boundary instead of Pod Label selectors. |
Canary node | Worker nodes with the tke-agent-network.io/agent-cni-canary=true label that are explicitly authorized to install Agent CNI. |
Agent CNI | A real CNI plugin responsible for Fake IP address, Pod network namespaces, veth, the agentcni0 bridge, routes, state files, and iptables rules. |
Fake IP | A dedicated address assigned by Agent CNI to Agent Pods. It is not equivalent to the primary CNI Pod IP address and is used for traffic convergence and source identity mapping. |
ZeroProxy | A node-local policy proxy that listens on :18080 and is responsible for Egress, Ingress, credential injection, Direct Bypass, auditing, and metrics. |
DNS Proxy | A UDP DNS proxy of ZeroProxy that listens on :18053 by default and receives DNS requests from Fake-IP Pods. |
Service CIDR | Address range of cluster Kubernetes Services. It must be provided during installation to prevent ClusterIP Service traffic from entering the HTTP policy proxy. |
AgentNetworkPolicy | A Namespaced CRD that declares Egress Allow/Credential/Deny, Ingress, and Direct Bypass policies. |
AgentNetworkClass | A Cluster-scoped CRD that declares node-level network parameters such as Fake IP CIDR, Service CIDR, and proxy ports. Some API fields are currently only delivered for recording and do not trigger data plane mode switching. |
CNI State | Pod network/identity state persisted by Agent CNI. ZeroProxy can use this state to map Fake IPs back to Pod identities. |
Direct Bypass | Behavior in which an Agent Pod directly accesses a destination address within the Agent Fake-IP CIDR and attempts to bypass the controlled ingress. This behavior is denied by default. Other TCP outbound requests are still processed by Egress policies. |
Dimension | Standard Pod Network | agent-network |
Egress Access | Applications can directly access reachable network targets. | ZeroProxy uniformly enforces Allow, Credential, and Deny. |
Credential Management | Secrets are often injected into business Pods. | Credentials are mounted only to ZeroProxy and injected during rule-based forwarding. |
DNS | Uses the primary CNI/cluster default DNS path. | DNS of Fake-IP Pods is centrally processed by the node-local DNS Proxy. |
Inter-Agent Calls | Relies on the service to perform authentication. | Supports Caller/Target rules and Fake-IP source identity verification. |
Bypass Control | A Pod may attempt to directly connect to the target. | Node iptables enforces traffic convergence, and Direct Bypass is denied by default. |
Audit | Logs are scattered across business systems. | ZeroProxy centrally outputs policy hits and access audit logs. |
Node Changes | No CNI changes. | CNI changes require Canary and verifiable rollback. |
Dimension | Sidecar Proxy | agent-network |
Access Mode | Inject a proxy container into each Pod. | Node-level Agent CNI + ZeroProxy |
Service Modification | May require modification of Deployment/Pod templates. | Agent applications do not need to be aware of the local proxy address. |
Resource consumption | One proxy resource per Pod | One ZeroProxy per Canary node |
Traffic Interception | Mostly relies on in-Pod redirection and injection logic. | Forcibly taken over by CNI and node iptables in the network path. |
Credential Location | May exist in both the business Pod and the Sidecar. | Credentials are retained only in the Secret mounted by ZeroProxy. |
Risk Scope | Mainly affects a single workload. | Involving node CNI, operations must strictly follow the canary and rollback process. |
Authorization request header.apiVersion: agent.tke.cloud.tencent.com/v1alpha1kind: AgentNetworkPolicymetadata:name: coding-agent-networknamespace: tke-agent-network-realspec:podSelector: {}priority: 100egress:allow:- name: public-githost: git.example.comprotocol: tcpport: 443credential:- name: private-githost: git.internal.example.comheader: AuthorizationvalueFrom:name: zeroproxy-credentialskey: REPO_TOKENdeny:- name: production-dbhost: prod-db.internaldirectBypass:defaultAction: deny
tke-agent-network-real). Business Pods can be in other namespaces, but AgentNetworkPolicy must be created in the namespace that the Controller listens on.X-Agent-Caller against the source Pod identity and matches target rules based on X-Agent-Target, reducing the risk of bypassing authorization by merely forging request headers.spec:podSelector: {}ingress:allow:- caller: "sa:agent-workloads:planner"target: "agent-server"deny:- caller: "sa:agent-workloads:untrusted-agent"target: "agent-server"
169.254.169.254/32100.64.0.0/10
Item | Description |
Current Version | Addon / Chart 0.3.0 |
Release Form | TKE Addon / Helm Chart |
Release status | In the grayscale release phase; the actual installable regions and versions are subject to what is displayed in the TKE Addon console. |
Supported cluster type | TKE managed cluster (MANAGED_CLUSTER) |
Kubernetes Version | Declared by Chart: greater than or equal to 1.20.0-0 |
Node OS | Linux |
Node Architecture | The current Chart targets amd64 nodes. |
Primary CNI Compatibility | Verified in real clusters in TKE ENI / Multus environments. The actual Service CIDR must be provided during installation. |
Policy Protocol | HTTP; TLS SNI passthrough is disabled by default. It is not recommended to enable it when trusted DNS or identity verification is not configured. |
Billed or not | The component is not billed separately, but it consumes CPU, memory, network, and log storage resources on the target node. |
SO_ORIGINAL_DST mechanism.agentCNI.installerEnabled is enabled by default. Only nodes with the Canary Tag will schedule the Installer and undergo CNI changes.agentCNI.installerEnabled=true, agentCNI.serviceCIDRs is a required installation parameter. If it is not provided, the Chart will refuse to render. You can omit this configuration only when installing the control plane only and explicitly disabling the Installer.agentCNI.fakeIPCIDR is 169.254.77.0/24, but it is not currently passed to the Installer as the actual CIDR parameter. When no AgentNetworkClass override is configured, the Installer derives a node-level /24 CIDR based on the node name. The actually allocated addresses must not conflict with node, Pod, Service, VPC, or other infrastructure network segments.18080/TCP, and DNS Proxy uses 18053/UDP. Before installation, confirm that the target node ports do not conflict.AgentNetworkPolicy uses valueFrom.name/key to reference a Secret mounted to ZeroProxy. The Controller converts it to valueFromFile in the runtime policy. valueFromEnv is not supported.zeroproxy.tls.allowUnverifiedSNI is disabled by default. Do not enable it when no trusted DNS or identity verification capability is available.podSelector / workloadSelector do not serve as Pod-level CNI access switches, so Canary nodes should remain dedicated nodes.AgentNetworkPolicy.spec.podSelector and AgentNetworkClass.spec.workloadSelector have been added to the API, but they are not currently used as Pod-level selective CNI access switches. At this stage, dedicated Canary nodes serve as the workload isolation boundary.AgentNetworkClass.spec.proxy.failMode and spec.cni.defaultConnectivity are currently API/downstream fields. In v0.3.0, the data plane still runs in Fail-Close / ZeroConnectivity mode, so you cannot rely on FailOpen for automatic direct connectivity.0.3.0 / v0.3.0. However, the current Agent CNI node version record may still show v0.2.5. This issue does not affect the verified data plane features, but it affects version tracking and upgrade diagnosis, and needs to be fixed and re-verified later.kubectl get node -o widekubectl get pod -A -o wide
kubectl label node <first-worker-node-name> \\tke-agent-network.io/agent-cni-canary=true
kubectl label node <second-worker-node-name> \\tke-agent-network.io/agent-cni-canary=true
kubectl get svc -A \\-o jsonpath='{range .items[*]}{.spec.clusterIP}{"\\n"}{end}' \\| grep -v -E '^(None|<none>|)$' \\| sort -u \\| head
192.168.x.x range, common Service CIDRs are:192.168.0.0/16
agent-network.0.3.0.agentCNI:serviceCIDRs:- <Actual Service CIDR>
InstallAddon API. The following is a basic installation JSON example:{"Region": "ap-<region>","ClusterId": "cls-xxxxxxxx","AddonName": "agent-network","AddonVersion": "0.3.0","RawValues": "{\\"agentCNI\\":{\\"serviceCIDRs\\":[\\"<Actual Service CIDR>\\"]}}"}
image.registry, image.tag, or the component repository in RawValues.credentialUpstream.enabled=true.credentials.repoToken and credentials.ragToken.zeroproxy.reload.enabled=true, and you must set a non-empty zeroproxy.reload.token.zeroproxy.upstreams.credentials.* and the reload token into component Secrets, so tokens for full demo/e2e verification can only be passed in through controlled API requests within an isolated test environment. Do not write production credentials into RawValues, command lines, sample files, or terminal history. After credential-upstreams is enabled, the test component reads the expected token from the Secret to verify the injection result. This does not change the product boundary that business Agent Pods do not mount credentials.tke-agent-network-real as an example:kubectl get ds,deploy,pod -n tke-agent-network-real -o wide
agent-cni-installer 1/1 Readyzeroproxy 1/1 Readyagent-network-controller 1/1 Ready
credential-upstreams 1/1 Ready
agent-cni-installer, zeroproxy, and credential-upstreams are all expected to be 2/2 Ready. For a default installation, verify that the first two DaemonSets are 2/2 Ready.ip addr show agentcni0ls -l /opt/cni/bin/agent-cnils -l /etc/cni/net.d/00-agent-cni.confls -la /var/lib/tke-agent-network/agent-cni/
sysctl \\net.ipv4.ip_forward \\net.ipv4.conf.all.rp_filter \\net.ipv4.conf.default.rp_filter \\net.ipv4.conf.agentcni0.rp_filter
net.ipv4.ip_forward = 1rp_filter = 0
kubectl exec -n tke-agent-network-real ds/agent-cni-installer -- \\/agent-cni --doctor \\--doctor-state-dir=/host/var/lib/tke-agent-network/agent-cni \\--doctor-host-cni-bin=/host/opt/cni/bin \\--doctor-host-cni-conf=/host/etc/cni/net.d \\--doctor-zeroproxy-url=http://127.0.0.1:18080/healthz
AGENT_CNI_DOCTOR_PASSED
Verification Level | Verification Content |
HTTP e2e | Allow, Credential, Deny, Ingress allow/deny, and Coding/RAG/Gateway demo of ZeroProxy |
Real CNI e2e | Fake-IP Pod,iptables REDIRECT,Coding,RAG,Direct Bypass deny |
Primary CNI Compatibility | DNS,ClusterIP Service |
Control plane | Dual ZeroProxy ConfigMap projection/reload, AgentNetworkPolicy eventually Active |
Security and observability | Audit logs do not leak credentials, and metrics are accessible. |
EGRESS_ALLOWED_BY_POLICYCREDENTIAL_INJECTED_BY_ZEROPROXYEGRESS_DENIED_BY_POLICYINGRESS_ALLOWED_BY_ZEROPROXYINGRESS_DENIED_BY_ZEROPROXYCODING_AGENT_DEMO_PASSEDRAG_AGENT_DEMO_PASSEDMULTI_AGENT_GATEWAY_DEMO_PASSED
EGRESS_ALLOWED_BY_POLICYCODING_AGENT_DEMO_PASSEDRAG_AGENT_DEMO_PASSEDDIRECT_BYPASS_DENIED_BY_ZEROPROXY
MAIN_CNI_DNS_PASSEDMAIN_CNI_SERVICE_PASSEDMAIN_CNI_COMPAT_CHECKS_PASSED
AgentNetworkClass override is configured, the Installer derives a different node-level /24 CIDR based on the node name. agentCNI.fakeIPCIDR currently only participates in Chart parameter validation and is not passed to the Installer as an effective CIDR parameter. Service CIDR traffic must bypass ZeroProxy and be forwarded by kube-proxy and the primary CNI.Fake-IP Pod├── DNS(UDP/53)→ ZeroProxy DNS Proxy├── ClusterIP Service → fwmark bypass → kube-proxy/primary CNI└── Other TCP → ZeroProxy policy proxy
deny → credential → allow → deny by default
AgentNetworkPolicy uses a Secret valueFrom.name/key reference. The Controller converts it to valueFromFile at runtime and does not write it into the Agent Pod.policy:directBypass:defaultAction: deny
Stop agent-cni-installer.Execute rollback-agent-cni on the Canary node.→ Check for residual files on the host.→ Remove the Canary tag.Then uninstall the Addon or clean up the remaining components.
agentcni0 bridgeAGENT-CNI iptables rules/opt/cni/bin/agent-cni/etc/cni/net.d/00-agent-cni.confThe /var/lib/tke-agent-network/agent-cni state file
agent-cni-installer Not Ready After Installationkubectl get pod -n tke-agent-network-real -o widekubectl describe pod -n tke-agent-network-real <installer-pod>kubectl logs -n tke-agent-network-real <installer-pod>
Symptom | Possible cause | Solution |
The DaemonSet is 0/0. | The node does not have the Canary tag. | Add the tke-agent-network.io/agent-cni-canary=true label only to selected Worker nodes. |
Chart rendering failed. | serviceCIDRs not provided. | Pass the actual cluster Service CIDR when Installer is enabled. |
ImagePullBackOff | Abnormal image address, public permission, or node network | Check the team image address and node pull events. |
preflight failed. | The CNI path, port, or host environment does not meet the requirements. | View Installer preflight logs. |
Pod creation indicates that PriorityClass does not exist. | Transient race condition in resource creation order | Wait for the DaemonSet to retry automatically. If the failure persists, check whether the PriorityClass is created. |
iptables -t nat -Siptables -t mangle -Skubectl get svc -A -o wide
agentCNI.serviceCIDRs is the actual Service CIDR.AGENT-CNI-MANGLE contains the 0x77 marking rule for the Service CIDR.AGENT-CNI-PREROUTING executes RETURN after the mark is hit.agentcni0, ip_forward, and rp_filter are normal.AgentNetworkPolicy Not Active for a Long Timekubectl get agentnetworkpolicy -A -o widekubectl logs -n tke-agent-network-real deploy/agent-network-controller --tail=200kubectl logs -n tke-agent-network-real ds/zeroproxy --tail=200
409 policy version not yet projected. The Controller should retry and eventually bring the Policy to:phase=ActiveobservedGeneration=<current generation>
hostNetwork Job to directly access the local ZeroProxy, verifying policies, credential injection, and proxy logic. Real CNI e2e uses a non-hostNetwork Pod to verify the complete data plane path involving Fake IP, agentcni0, node iptables REDIRECT, and ZeroProxy. Both should pass.Parameter | Type | Default Value | Description |
canaryLabel.key | string | tke-agent-network.io/agent-cni-canary | Select the tag Key of the Canary node. |
canaryLabel.value | string | true | Tag Value for selecting the Canary node. |
agentCNI.installerEnabled | bool | true | Create a real CNI Installer DaemonSet or not |
agentCNI.serviceCIDRs | string array | [] | Actual cluster Service CIDR; required when Installer is enabled. |
agentCNI.fakeIPCIDR | string | 169.254.77.0/24 | Currently only participates in Chart parameter validation. When NetworkClass override is not configured, the actual node CIDR is derived from the node name. |
agentCNI.zeroProxyPort | int | 18080 | Target port for TCP redirection |
zeroproxy.dnsProxy.listen | string | :18053 | DNS Proxy listening address |
zeroproxy.reload.enabled | bool | false | Enable the policy hot-reload authentication API from Controller to ZeroProxy or not |
credentialUpstream.enabled | bool | false | Deploy test credentials to verify the upstream or not |
controller.enabled | bool | true | Enable CRD Controller or not |
rollback.enabled | bool | false | Render a temporary CNI rollback DaemonSet or not |
Layer | Component | Responsibilities |
Node data plane | agent-cni-installer | Install/run Agent CNI, and configure bridge, iptables, sysctl, and CNI status. |
Node data plane | agent-cni | Real CNI binary invoked by kubelet to process Pod ADD/DEL/CHECK. |
Node agent | zeroproxy | Egress, Ingress, Credential, DNS, Direct Bypass, audit, and metrics. |
Control plane | agent-network-controller | Reconcile AgentNetworkPolicy / AgentNetworkClass, update ConfigMap, and coordinate reload. |
Test dependencies | credential-upstreams | Protected test upstream for verifying credential injection in full e2e. |
Validation tool | agent-network-e2e | Verification Job for HTTP, real CNI, DNS/Service, and Agent demo. |
Temporary rollback component | rollback-agent-cni | Runs only when rollback.enabled=true to clean up the node CNI data plane. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan