Cloud native zero trust security for AI agents run environments

★ 299⑂ 11👁 4⑃ 328● 50▤ 7
CAGPL-3.0Created 2026-02-07getkloak.io
下载:v0.3.0v0.3.0 ↓0.3.02026-11-02
+0
日增长
299
stars
11
forks
4
watchers
328
prs
50
issues
7
releases

README

Kloak


  Secure Your Secrets, Agentless
  Kubernetes eBPF HTTPS interceptor. Transparent secret injection without application changes or sidecars.












---

Kloak transparently intercepts outbound TLS traffic in Kubernetes using eBPF uprobes, replacing placeholders with real secrets in-kernel by patching the encrypted TLS record on its way out of the pod. Applications never handle actual credentials, and no sidecars or code changes are required.

 Features

- No code changes -- No SDK, no library, no application modifications. Mount a secret, make HTTPS requests, and Kloak handles the rest.
- Secret isolation -- Applications only see random shadow values (kl::…, same length as the real value). The real value is never written into the pod's memory; it is XOR-patched into the AES-GCM ciphertext in-kernel.
- Zero overhead -- eBPF uprobes operate in kernel space with negligible latency impact. No userspace proxy or sidecar in the data path.
- Kubernetes native -- Works with standard Kubernetes Secrets. Enable with a single label.
- Per-pod secret binding -- A pod can only use the secrets it references in its spec (Secret volume, secretKeyRef, envFrom). A placeholder sent by any other pod, even one that learned it, goes out unchanged.
- Host and IP filtering -- Secrets annotated with getkloak.io/hosts are only sent to specific destination hostnames or IP addresses, preventing exfiltration to unauthorized servers. Each restricted hostname gets its own virtual IP, so kloak knows which host a connection is for even when hosts share addresses (a CDN, a shared ingress).
- Port-based filtering -- Secrets annotated with getkloak.io/port are restricted to connections on a specific destination port.
- Broad runtime support -- Hooks into OpenSSL, BoringSSL, and Go's native crypto/tls. Works with Python, Node.js, Bun, Go, Rust, Ruby, PHP, curl, and any OpenSSL-linked runtime.

 Quick Start

 Prerequisites

- Kubernetes cluster (1.28+) with Linux kernel 5.17+ (6.6+ attaches the tc patch program via TCX; older kernels fall back to a clsact qdisc + cls_bpf filter, see controller.ebpf.tcAttachMode)
- The virtual IP ranges kloak hands out (default 198.18.0.0/15 and 2001:2::/48, reserved for benchmarking and never routed) must not be used by the cluster or its nodes. The controller checks this at startup and refuses to start otherwise (controller.ebpf.virtualIPRange).
- containerd 2.0+ or CRI-O 1.30+ is recommended: through their NRI hook, kloak sets up a pod's DNS rewrite before its containers start, and attaches each container's TLS uprobes before it starts, so even its first request gets the secret. On other runtimes the rewrite is set up as soon as the pod's sandbox runs and a container is attached once the pod's status reports it running, which leaves a short window at pod start (see controller.nri in the chart values).
- Helm 3.12+
- kubectl configured with cluster access

 Install with Helm

bash
helm repo add kloak https://chart.getkloak.io
helm repo u

Top issues

Discussions

Latest release

v0.3.0 v0.3.0 2026-11-02
What's Changed
 chore(bun): track offsets for bun-v1.4.3 by @dhiaayachi in https://github.com/spinningfactory/kloak/pull/323
 chore(deps): bump golang.org/x/sys from 0.48.0 to 0.49.0 by @dependabot[bot] in https://github.com/spinningfactory/kloak/pull/324
 chore(deps): bump golang.org/x/net from 0.59.0 to 0.61.0 by @dependabot[bot] in https://github.com/spinningfactory/kloak/pull/325
 feat(ebpf): only rewrite host-scoped secrets on connections whose SNI is the host by @dhiaayachi in https://github.com/spinningfactory/kloak/pull/329
 ci(coverage): fix unit + e2e merge that under-reported c

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON