Kuberty, kubernetes testing for service clusters

toonsevrin

Toon Sevrin

Posted on May 22, 2020

Kuberty, kubernetes testing for service clusters

My Final Project

When you start getting into services, you quickly discover how trivial unit tests and integration tests are. Small codebases are easy to perfect and are thus easy to test.

The hard truth is, most production errors no longer result from the codebase itself. These errors result from the way the service interacts with it's environment, an environment you've either completely mocked out, or ran in a fashion that does not resemble production.

Kuberty is a thought experiment. It wonders if there is a way to add a small definition file to each of your services containing its dependencies and most importantly its tests. The kuberty controller can then use this definition to deploy the service and all of its dependencies (recursively) and execute all of your tests this way.

Taking this one step further, the controller then resets the databases (and other state) each time a test is ran, making tests independent from eachother.

This is the future of testing on kubernetes. This is Kuberty.

Demo Link

To learn more about Kuberty take a look at the README.md.

GitHub logo kuberty / kuberty

Kubernetes native microservice testing framework.

Kuberty

Kubernetes native testing framework for microservices. Write your tests in any language, declare your service dependencies and Kuberty will build a test cluster and test your service for you.

Documentation

To learn more about Kuberty go to our documentation.

Installation

Install the Kuberty cli locally:

wget https://github.com/kuberty/kuberty/releases/...  && chmod +x kuberty  && mv kuberty /bin/bash/kuberty

Installation instructions for Windows, Mac and Docker.

Install Kuberty on your cluster:

kubectl apply -f https://raw.githubusercontent.com/kuberty/kuberty/master/deploy/install-kuberty.yaml

Custom Resource Definitions

Applications specifies your application and it's dependencies

apiVersion: kuberty.io/v1
kind: Application
metadata
  name: auth-service-test-deployment-{{ .Values.test_id }}
  namespace: kuberty
  labels
    app: auth-service
spec
  app:
    chart: 3000 bytes
    path: helm
  database:
    type: redis
    service:
      name: redis
      namespace: auth-service
  dependencies:
  - app: count-service
    repository: https://github.com/kuberty/example-count-service.git
    revision: v0.0.1
    path: helm

Files define the artifacts for…

💖 💪 🙅 🚩
toonsevrin
Toon Sevrin

Posted on May 22, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related