kubeyard
A utility to develop, test and deploy Kubernetes microservices.
Requirements
- bash
- minikube
- kubectl
- docker
- conntrack
Important: Kubeyard is tested on:
- minikube == v1.29.0 (should work with v1.29.0 and above)
- docker == 20.10.23 (should work with any version)
- kubectl == v1.21.14 (should work with v1.21.14 and above)
Installation
rm -rf $HOME/kubeyard-venv
virtualenv -p python3 $HOME/kubeyard-venv
. $HOME/kubeyard-venv/bin/activate
pip install kubeyard
echo '. $HOME/kubeyard-venv/bin/activate' >> $HOME/.bashrc
Workspaces
A workspace is an isolated development environment: one Kubernetes namespace
(ws-<name>) holding the services you are changing, with every other service
aliased back to default. This lets several coding agents, or several features
in flight, run concurrently in separate git worktrees without colliding.
kubeyard workspace create example
cd .worktrees/example
kubeyard build && kubeyard deploy
create makes the git worktree too, on a branch ws-<name>, and prints the
path to cd into, along with how to tear it down again.
The workspace is recorded in a .kubeyard-workspace file in the worktree, so
every later command picks it up automatically. Add both that filename and
.worktrees/ to the repository's .gitignore.
kubeyard workspace show # what is deployed here versus aliased
kubeyard undeploy # put this service back on the shared instance
kubeyard workspace destroy # remove the whole workspace
Seeding development data
A project can declare how to load its development data:
dev_seed_command: python -m tests.demo
dev_seed_pod: api # optional; defaults to the shortest running pod name
kubeyard seed then runs that command inside the deployed pod, in the namespace
kubeyard already knows - so from a workspace it seeds that workspace's database.
deploy runs it for you when it has just created the database - so a new workspace,
or a new checkout of the shared environment, comes up with data already in it. A
redeploy finds the database present and leaves it alone.
Without a .kubeyard-workspace file, kubeyard behaves exactly as it always has
and targets the shared environment.
See docs/workspaces.md for why workspaces exist, how the alias overlay works, and the limits worth knowing before relying on them.
Release files for kubeyard 1.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kubeyard-1.3.1.tar.gz | 113.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kubeyard-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 255.7 kB
Release files / kubeyard-1.3.1.tar.gz
| Download URL | kubeyard-1.3.1.tar.gz |
|---|---|
| Size | 113.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2d292f9f6b00fb118f0e2f87a29012d51530c0a0cc9c5c9edfe409d74754e32
|
|
BLAKE2b-256 checksum How to use checksums |
1a70c4b81bb21a33842946b99a6ab7a2fe890853b779a37a134fba53f7914caa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / kubeyard-1.3.1-py3-none-any.whl
| Download URL | kubeyard-1.3.1-py3-none-any.whl |
|---|---|
| Size | 141.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7b3ae118c7453f51d5935fc2519cbbb9bd4841952d0334fa46543241fe86811
|
|
BLAKE2b-256 checksum How to use checksums |
32b1b9de1867b43194ef2dd3be35547a40f775dbf64ac8360194e83fa0e8f785
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|