/kubernetes-platform-skills:testkube-kubernetes-native-test-executionfrom kubernetes-platform-skills
Runs test suites (Postman/Newman, k6, Cypress, Playwright, JMeter) as Kubernetes-native Test/TestSuite CRDs via Testkube, executing inside the cluster against in-cluster services with results wired into CI.
Ships in kubernetes-platform-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A CI runner (a GitHub Actions job, a Jenkins agent) executes outside the
cluster by default — reaching an in-cluster-only service (one with no
public Ingress, addressable only via its ClusterIP/internal DNS name)
requires port-forwarding, a VPN hop, or a temporary Ingress just for the
test run, all of which are extra plumbing that drifts from what actually
runs in production. Testkube inverts this: it installs an operator and
CRDs (Test, TestSuite, and, in newer versions, the more general
TestWorkflow) into the cluster itself, so a test (a Postman/Newman
collection, a k6 load test, a Cypress/Playwright E2E suite, a JMeter
plan, or a custom script) runs as a pod inside the cluster, with
direct network access to the same internal services, Secrets, and
ConfigMaps the application itself uses — no port-forward, no temporary
Ingress, no VPN. Test executions, results, and logs become Kubernetes
objects (Executions) queryable via kubectl/the Testkube CLI/API, not
just CI console output that disappears when the job ends. This skill
covers authoring Test/TestSuite resources and wiring them into CI;
the resulting workload-scaling behavior under a Testkube-driven load test
is a good input to
keda-configuration-validation's
threshold checks, but that validation itself is out of scope here.
ClusterIP
address without exposing it publicly or setting up a port-forward.TestSuite run, rather than juggling separate CI job
definitions for each tool.kubeshop/testkube Helm chart or the Testkube CLI's
testkube init), which installs the API server, the executor
controller, and (optionally) a MinIO/S3-backed artifact store for test
logs and results.kubectl testkube plugin or standalone testkube
binary) installed wherever tests are triggered from — a developer
machine or the CI runner.NetworkPolicy review that applies to any other in-cluster workload;
a default-deny policy that doesn't account for Testkube's executor
pods will make every test fail with a connection error that looks like
an application bug.ConfigMap/custom test-runner image, depending on
executor and repository size.Execution results, not a cluster-admin credential handed to the
CI runner.Define a Test CRD for a single test type, referencing the test
content and specifying the executor:
apiVersion: tests.testkube.io/v3
kind: Test
metadata:
name: checkout-api-smoke
namespace: testkube
spec:
type: postman/collection
content:
type: git
repository:
uri: https://github.com/example-org/checkout-api-tests.git
branch: main
path: collections/smoke.postman_collection.json
executionRequest:
variables:
BASE_URL:
value: http://checkout-api.checkout.svc.cluster.local:8080
type: basic
negativeTest: false
BASE_URL points at the service's internal cluster DNS name, not
a public endpoint — this is the core advantage over running the same
Postman collection from a CI runner, which would need that service
exposed externally or a tunnel into the cluster to reach it at all.
Define a k6 load test the same way, for load/performance testing against an in-cluster target:
apiVersion: tests.testkube.io/v3
kind: Test
metadata:
name: checkout-api-load
namespace: testkube
spec:
type: k6/script
content:
type: git
repository:
uri: https://github.com/example-org/checkout-api-tests.git
branch: main
path: k6/checkout-load.js
executionRequest:
variables:
TARGET_URL:
value: http://checkout-api.checkout.svc.cluster.local:8080/checkout
type: basic
VUS:
value: "50"
DURATION:
value: "5m"
Running this inside the cluster means the load test's own network hop to the target is the same internal-service-to-internal-service path real production traffic between microservices takes — a load test run from outside the cluster instead measures the cluster's Ingress/LB path, which is a different (and often more favorable) bottleneck profile.
Chain multiple Tests into an ordered TestSuite so a release
validation runs API checks, then load, then E2E in sequence rather
than as separate uncoordinated CI jobs:
apiVersion: tests.testkube.io/v2
kind: TestSuite
metadata:
name: checkout-release-validation
namespace: testkube
spec:
steps:
- execute:
- test: checkout-api-smoke
- execute:
- test: checkout-api-load
- execute:
- test: checkout-e2e-cypress
executionRequest:
variables:
BASE_URL:
value: http://checkout-api.checkout.svc.cluster.local:8080
type: basic
Steps run in order; each step's execute list can contain multiple
tests run in parallel within that step, with the suite as a whole
failing if any required step fails — model this the same way a
CI pipeline's sequential stages of parallel jobs are modeled in
ci-cd-pipeline-design.
Trigger execution manually or via CLI to validate the definitions before wiring them into CI:
kubectl testkube run test checkout-api-smoke --namespace testkube -f
kubectl testkube run testsuite checkout-release-validation --namespace testkube -f
The -f flag follows execution logs live; omit it to trigger
asynchronously and poll status separately with
kubectl testkube get execution <execution-id>.
Wire test execution into CI as a thin trigger-and-poll step,
keeping the CI runner itself free of every test tool's runtime
(GitHub Actions example; the same CLI invocation works from Jenkins,
GitLab CI, or any other runner with kubectl/cluster access):
# .github/workflows/post-deploy-validation.yml
jobs:
run-testkube-suite:
runs-on: ubuntu-latest
steps:
- name: Configure kubeconfig
run: echo "${{ secrets.KUBECONFIG_B64 }}" | base64 -d > $HOME/.kube/config
- name: Install Testkube CLI
run: curl -sSLf https://get.testkube.io | sh
- name: Run release validation suite
run: |
kubectl testkube run testsuite checkout-release-validation \
--namespace testkube -f --output-format json > result.json
- name: Fail the job if the suite failed
run: |
jq -e '.status == "passed"' result.json
The actual test tooling (k6, Newman, Cypress binaries/images) never
needs to be installed on the CI runner — Testkube's executor images
inside the cluster carry that, and the CI job only needs kubectl
cluster access and the Testkube CLI.
Scope the CI-facing credential to trigger and read executions only, not broad cluster access:
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: testkube-ci-trigger
namespace: testkube
rules:
- apiGroups: ["tests.testkube.io", "testworkflows.testkube.io"]
resources: ["tests", "testsuites", "testexecutions", "testsuiteexecutions"]
verbs: ["get", "list", "create", "watch"]
Bind this Role (not cluster-admin, and not even a broad namespace
edit role) to the service account/token the CI pipeline
authenticates with.
For newer Testkube installations, consider TestWorkflow instead
of separate Test/TestSuite resources — it generalizes both into a
single pipeline-style CRD with explicit steps, artifacts, and
templates, which is the direction Testkube has been consolidating
toward. Check which CRD version the installed Testkube operator
actually supports before authoring against TestWorkflow syntax, since
older operator versions only understand Test/TestSuite.
ClusterIP/cluster-DNS service addresses,
not a public Ingress hostname — the in-cluster network path is
Testkube's whole advantage over CI-runner-based testing, and testing
through the public path defeats it while also adding an unnecessary
external dependency to the test run.git content type, not pasted
inline into the CRD, so test changes go through the same PR review as
application code.TestSuite immediately after every deploy (wired
into the same pipeline that performs the deploy) rather than only on a
separate nightly schedule — catching a broken deploy within minutes is
far cheaper than discovering it the next morning.Test
spec's job template, where the executor supports it) — an
unconstrained load-test executor pod (k6 with a high VUS count) can
itself consume enough cluster resources to starve the very services
it's testing, producing misleading results.Symptom: A Test execution fails with a connection timeout/refused
error reaching the target service, even though the service is
confirmed healthy via kubectl port-forward.
Fix: Check for a NetworkPolicy in the target namespace that
default-denies ingress from other namespaces (including Testkube's
executor namespace) — the executor pod runs as a normal in-cluster
pod subject to the same network policy as anything else, and a
default-deny policy that never accounted for Testkube will block it
even though manual port-forward access (which bypasses in-cluster
networking) works fine.
Symptom: A k6 load test run via Testkube reports much better
latency numbers than what real users/CI-external load tests observe
against the same service.
Fix: Confirm the test's TARGET_URL actually points at the
service's cluster-internal address, not a public Ingress/LB hostname —
if it's internal, the results are measuring internal service-mesh
latency, not what an external client experiences through Ingress/CDN/
TLS termination; that's a legitimate and useful measurement, but it
must be labeled as such rather than presented as end-user latency.
Symptom: A CI pipeline step that triggers a Testkube TestSuite
reports "success" even though one of the suite's later steps actually
failed.
Fix: Check the actual JSON/exit status of the suite execution,
not just that the kubectl testkube run command itself returned exit
code 0 (which it usually does even for a failed test run unless
explicitly checked) — parse the result payload's status field (as in
step 5's jq -e check) and fail the CI job explicitly on anything
other than a fully-passed suite.
Symptom: A load test's executor pod consumes enough CPU/memory to cause the namespace's other pods (including the service under test) to be throttled or evicted, producing load-test results that reflect resource contention rather than the target service's real capacity. Fix: Set explicit resource requests/limits on the executor pod template and, for anything beyond a light smoke test, run load tests in a dedicated namespace/node pool separate from the services being tested, so the test's own resource footprint doesn't contaminate the measurement.
Symptom: Test execution history (Execution objects, logs,
artifacts) grows unbounded in the testkube namespace over months,
degrading API server list operations against that namespace.
Fix: Configure Testkube's execution history retention/cleanup (via
its Helm chart values or a scheduled cleanup job) to a bounded window,
the same way successfulJobsHistoryLimit/failedJobsHistoryLimit
bound Kubernetes Job history elsewhere in this repo's guidance.
Scenario: After every deploy of checkout-api to a namespace, the
team wants an automated smoke test (Postman), a brief load test (k6),
and — only for a full release, not every merge — an E2E suite (Cypress),
run in-cluster and gating whether the deploy pipeline proceeds to promote
the release.
Test definitions (checkout-api-smoke and checkout-api-load as
authored in steps 1–2 above), plus:
apiVersion: tests.testkube.io/v3
kind: Test
metadata:
name: checkout-e2e-cypress
namespace: testkube
spec:
type: cypress/project
content:
type: git
repository:
uri: https://github.com/example-org/checkout-api-tests.git
branch: main
path: e2e
executionRequest:
variables:
CYPRESS_BASE_URL:
value: http://checkout-web.checkout.svc.cluster.local:3000
type: basic
TestSuite gating a full release (as authored in step 3), triggered
from the deploy pipeline's post-deploy stage:
# GitHub Actions step, appended after the deploy job succeeds
- name: Run full release validation suite
run: |
kubectl testkube run testsuite checkout-release-validation \
--namespace testkube -f --output-format json > result.json
jq -e '.status == "passed"' result.json
If checkout-api-smoke or checkout-api-load fails, the suite stops
before running the (slower) Cypress E2E step, and the pipeline's
promotion-to-production stage is blocked by the non-zero jq -e exit
code — the same fail-fast principle as ordering a fast unit-test stage
before a slow integration-test stage in any other pipeline design.
Test/TestSuite resources as a Helm chart alongside the application they test.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
testkube, kubernetes-testing, k6, postman, cypress, playwright, jmeter, test-crd
35 skills in this plugin
/cert-manager-tls-automationGuides installing and configuring cert-manager for automated TLS certificate issuance and renewal — Issuers vs. ClusterIssuers, ACME/ Let's Encrypt HTTP-01 and DNS-01 challenges, private-CA issuance, and integration with Ingress-nginx and Istio gateways. Use when a user asks to "automate TLS certificates on Kubernetes," "set up cert-manager with Let's Encrypt," "fix a stuck Certificate that won't become Ready," "use DNS-01 for a wildcard cert," "rotate mTLS certs automatically," or "issue certs from an internal CA."
/cni-networking-calico-flannelGuides choosing and installing a Kubernetes CNI plugin — Calico vs. Flannel — including NetworkPolicy enforcement capability differences, BGP vs. VXLAN/overlay data paths, and IP address management (IPAM) tradeoffs. Use when a user asks to "choose a CNI plugin for Kubernetes," "enable NetworkPolicy enforcement," "set up Calico with BGP peering," "install Flannel," "debug pod-to-pod connectivity across nodes," or "migrate from Flannel to Calico."
/complete-kubernetes-deployment-on-aks-from-scratchSequences a complete, end-to-end AKS deployment from a bare Azure subscription to a production-ready cluster serving a first workload — Azure landing zone prerequisites, AKS cluster and node pool provisioning, Azure CNI (with the Calico/Cilium alternative noted), ingress (Application Gateway Ingress Controller vs. ingress-nginx), cert-manager with Azure DNS, conformance validation, a Helm-deployed workload, and a node/cluster health baseline. This is an integration/orchestration skill that sequences several existing tool-specific skills in the correct order and flags the handoff points between them — it does not restate their internals. Use when a user asks to "deploy a Kubernetes cluster on AKS from scratch," "set up a new AKS environment end to end," "build a production AKS cluster from a fresh Azure subscription," or "give me the full sequence to go from nothing to a working AKS cluster."
npx claudepluginhub selvarajmurugesan90/ops-engineering-skills --plugin kubernetes-platform-skillsOther plugins' skills for the same job