Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/go-tk/vk8s

Setting up a virtual Kubernetes cluster inside a Docker container for integration testing
https://github.com/go-tk/vk8s

Last synced: 3 months ago
JSON representation

Setting up a virtual Kubernetes cluster inside a Docker container for integration testing

Awesome Lists containing this project

README

        

# vk8s

Setting up a virtual Kubernetes cluster inside a Docker container for integration testing.

**Note**: A virtual Kubernetes cluster consists of virtual nodes, once newly-created pods are
assigned to these nodes, pods will immediately be reported as RUNNING status, but in reality
no any container of pods has been created and run, this is a trick achieved by [virtual-kubelet](https://github.com/virtual-kubelet/virtual-kubelet).

# Examples

- [Use in Shell](#use-in-shell)
- [Use in Go](#use-in-go)

## Use in Shell

```sh
# Run vk8s in background
docker run --name=vk8s -e TTL=300 -d --rm -p 9191:8080 ghcr.io/go-tk/vk8s:v0.2.1

# Ensure vk8s is ready (~15s)
docker exec vk8s ./wait-for-ready.bash

# Create a pod
kubectl -s http://127.0.0.1:9191 apply -f - <