Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/go-tk/vk8s
- Owner: go-tk
- Created: 2022-06-19T04:46:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-17T05:29:10.000Z (over 2 years ago)
- Last Synced: 2024-07-29T13:33:42.222Z (5 months ago)
- Language: Shell
- Homepage:
- Size: 57.6 KB
- Stars: 77
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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 - <