Kubernetes End-to-end Testing for Everyone

Kubernetes End-to-end Testing for Everyone

  • April 8, 2019
Table of Contents

Kubernetes End-to-end Testing for Everyone

Implementing a test suite. This is the main focus of this blog post. The Kubernetes E2E framework is written in Go.

It relies on Ginkgo for managing tests and Gomega for assertions. These tools support “behavior driven development”, which describes expected behavior in “specs”. In this blog post, “test” is used to reference an individual Ginkgo.

It spec. Tests interact with the Kubernetes cluster using client-go. Bringing up a test cluster.

Tools like kubetest can help here. Running an E2E test suite against that cluster. Ginkgo test suites can be run with the ginkgo tool or as a normal Go test with go test.

Without any parameters, a Kubernetes E2E test suite will connect to the default cluster based on environment variables like KUBECONFIG, exactly like kubectl. Kubetest also knows how to run the Kubernetes E2E suite.

Source: kubernetes.io

Share :
comments powered by Disqus

Related Posts

A Guide to Kubernetes Admission Controllers

A Guide to Kubernetes Admission Controllers

Kubernetes has greatly improved the speed and manageability of backend clusters in production today. Kubernetes has emerged as the de facto standard in container orchestrators thanks to its flexibility, scalability, and ease of use. Kubernetes also provides a range of features that secure production workloads.

Read More