Using Sonobuoy for Kubernetes Conformance Testing
This guide explains how to install Sonobuoy, run Kubernetes conformance tests, retrieve and analyze results, and understand the tool’s architecture and role in ensuring cluster portability and CNCF certification.
“Conformance” defines a set of interoperability features that a Kubernetes (K8s) cluster must support to guarantee consistent behavior across environments; Sonobuoy is a diagnostic tool that runs non‑destructive tests to verify this conformance.
Sonobuoy provides three main functions: conformance testing, workload debugging, and custom tests with data collection. Its architecture consists of a command‑line client, an in‑cluster aggregator, and one or more test plugins.
Installation steps include installing kubectl (see https://kubernetes.io/docs/tasks/tools/), downloading the Sonobuoy binary from https://github.com/vmware-tanzu/sonobuoy/releases, and verifying with sonobuoy version.
To execute tests, the guide uses the e2e plugin. First, sync the required conformance image using Skopeo:
skopeo --override-os linux copy docker://k8s.gcr.io/conformance:v1.21.3 docker://r.addops.soft.360.cn/google-containers/conformance:v1.21.3 --insecure-policy --dest-tls-verify=falseThen download the e2e plugin YAML (https://github.com/vmware-tanzu/sonobuoy-plugins/blob/main/e2e/e2e.yaml) and adjust the image reference. Run the test with: sonobuoy run --plugin ./plugin/e2e.yaml During execution, Sonobuoy creates test pods; status can be checked with sonobuoy status. After completion (typically 1‑2 hours), retrieve results using sonobuoy retrieve, which produces a *.tar.gz archive.
Results can be examined with sonobuoy result <file> or by extracting the archive and reviewing the JUnit reports. Failed test cases can be investigated by locating their definitions in the Kubernetes source repository (e.g., test/e2e/apps/daemon_set.go).
The article concludes that Sonobuoy‑based conformance testing ensures component compatibility, provides CNCF certification, and helps users achieve near‑native Kubernetes functionality across different vendor distributions.
360 Tech Engineering
Official tech channel of 360, building the most professional technology aggregation platform for the brand.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
