Keploy as a Kubernetes testing framework
Keploy records traffic inside a running Kubernetes pod, capturing the requests a service serves and every downstream call it makes across the cluster, then replays them in CI. No test cluster, ephemeral namespace, or service mesh is needed to run the resulting tests.
keploy record -c "./orders-service"What Keploy gives a Kubernetes team
Any workload, any language
Keploy records inside the pod at the socket layer, so the container image, language, and framework do not matter. A Deployment, StatefulSet, or Job all record the same way.
- Any container image or runtime
- Deployments, StatefulSets, and Jobs
- No sidecar injection required
- No mesh or CNI dependency
Why Kubernetes integration tests slow teams down
The friction is rarely the assertions. It is everything around them — spinning up dependencies, keeping mocks honest, and repairing tests after every refactor.
Testing Kubernetes: by hand, with ephemeral namespaces, or with Keploy
Ephemeral namespaces give real cluster fidelity and make every pipeline wait for a full stack. Keploy records that stack once and replays it as a plain process.
Select any row for the full comparison, with code.
What you write for Kubernetes vs what Keploy records
All three produce the same assertion. Only the third still passes after the next refactor without anyone editing it.
Three fakes for three services, each encoding a contract another team owns. Every one of them goes stale the week that team ships.
The highest-fidelity option there is, and the pipeline spends most of its time installing charts and waiting for pods rather than testing.
The recorded pod traffic includes every downstream service call, so this job exercises the same request path without deploying a single dependency.
Times are estimates for authoring one endpoint’s coverage from scratch, not measurements.
Kubernetes testing tools, compared
The options a team on service and platform integrations actually reaches for, and where each one genuinely wins. Select a row for the full comparison.
Assessments reflect each tool’s documented behaviour, not benchmark measurements.
Record your Kubernetes app once, replay it forever
Keploy sits below your Kubernetes process at the network layer. It watches the calls your app already makes, then serves them back on replay so tests run with no dependencies attached.
Keploy records a GET call to /api/v1/orders/{id} on a Kubernetes service and captures the dependency calls it makes.
What Keploy mocks for Kubernetes, with zero config
7 of the 8 dependencies a typical Kubernetes service talks to are stubbed from the recording itself — no mock classes, no fixture files, no containers in CI.
- Service-to-service HTTPAuto-mocked
Service-to-service HTTP
Any in-cluster REST call between pods
- Auto-mocked
gRPCView page
HTTP/2 framed calls between services
- Auto-mocked
PostgreSQLView page
Postgres protocol to an in-cluster or managed database
- Auto-mocked
MySQLView page
MySQL protocol to an in-cluster or managed database
- Auto-mocked
RedisView page
RESP to an in-cluster cache
- Auto-mocked
Apache KafkaView page
Kafka protocol to an in-cluster broker
- Auto-mocked
MongoDBView page
Wire protocol to an in-cluster or managed cluster
- Partial
Istio and Linkerd
Recording through a mesh sidecar
Your first Kubernetes test suite in under five minutes
Every command below runs against your existing Kubernetes service. Nothing in your source tree changes.
1Install the Keploy CLI
A single binary. It needs a Linux kernel with eBPF support, or Docker on macOS and Windows — and it adds nothing to your project's dependencies.
curl -sSL https://keploy.io/install.sh | bash2Record your service
Pass the command you already use to start the app. Keploy runs it and watches every socket it opens.
keploy record -c "./orders-service"3Exercise the paths you care about
Record inside the pod while real traffic flows. Every downstream service, database, and cache call the request triggered is captured with it.
kubectl port-forward svc/orders 8080:80curl -X POST localhost:8080/orders/ord_1/confirm -d '{"paymentToken":"tok_123"}'4Replay in CI
Replay serves the recorded dependency responses, so the job needs no service containers and no Docker daemon.
keploy test -c "./orders-service" --delay 8
Ready to try it on your own Kubernetes service?
Works with the rest of your Kubernetes stack
Keploy records at the network layer, so framework and driver choices inside your Kubernetes app do not change how it captures traffic.
Docker
Record in any container image; replay needs no runtime.
gRPC
Cross-service calls captured as HTTP/2 frames.
Go
Compiled services record with no code change.
Java
JVM workloads record without an agent.
Apache Kafka
In-cluster broker traffic records at the protocol layer.
PostgreSQL
Managed or in-cluster databases record identically.
Testing the rest of your stack
- Cloud & Infra
Keploy as a gRPC testing framework
Record real gRPC exchanges over HTTP/2 and replay them as tests — no in-process stub server, no hand-written mock service implementation.
Read the guide - Languages
Keploy as a Go testing framework
Record a running Go binary once and get table-test-grade coverage with sqlmock-free database stubs and no httptest servers to maintain.
Read the guide - Languages
Keploy as a Java testing framework
Generate JUnit-grade integration tests for any JVM service by recording the traffic it already serves.
Read the guide - Message Queues
Keploy as a Apache Kafka testing framework
Test producers and consumers against recorded broker exchanges — no embedded Kafka, no Testcontainers cluster, no flaky poll loops.
Read the guide - Databases
Keploy as a PostgreSQL testing framework
Record the Postgres frontend/backend protocol once and replay real result sets in tests — no container, no pg-mem, no schema to rebuild.
Read the guide - Caches & Stores
Keploy as a Redis testing framework
Record RESP traffic once and replay real cache hits, misses, TTLs, and pipeline responses without a Redis server in CI.
Read the guide
Join our GlobalCommunity
Connect with developers worldwide. Follow updates, ask questions, share feedback, and ship faster with other Keploy builders.
“Best report of integration and API tests I've seen — which we don't get from RestAssured.”
G2“Future of microservices testing. I don't write tests now!”
G2 · 5/5“An amazing product that simplifies the automation.”
Gartner · 4.0