Launching tests in containers on Kubernetes

5/20/2020

I'm building a test automation tool that needs to launch a set of tests, collect logs and results. My plan is to build container with necessary dependency for test framework and launch them in Kubernetes.

Is there any application that abstracts complexity of managing the pod lifecycle and provides a simple API to achieve this use-case preferably through API? Basically my test scheduler need to deploy a container in kubernetes, launch a test and collect log files at the end.

I already looked at Knative and kubeless - they seem to be complex and may over-complicate what I'm trying to do here.

-- bram
automated-tests
containers
kubernetes

2 Answers

5/20/2020

Try looking at https://microk8s.io/, it was built for those purposes.

And you can talk to the API server via the rest API same as in every k8s cluster.

-- omricoco
Source: StackOverflow

5/21/2020

Based on information you provided all I can recomend is kubernetes API itself.

You can create a pod with it, wait for it to finish and gather logs. If thats all you need, you don't need any other fancy applications. Here is a list of k8s client libraries.

If you don't want to use client libraries you can always use REST api.

If you are not sure how to use REST api, run kubectl commands with --v=10 flag for debug output where you can see all requests between kubectl and api-server as a reference guide.

Kubernetes also provided detailed documentation for k8s REST api.

-- HelloWorld
Source: StackOverflow