This is a small Kubernetes operator written with kopf.
It is for educational purposes only and probably has many bugs in it. Use it to learn and discover how easy it can be to write a Kubernetes operator.
It uses the LimitedNamespace CR with crd.yaml that creates a namespace that is auto-deleted after a specified time.
- Make sure you have access to a Kubernetes cluster
- Install python modules (
pip install -r requirements.txt
) - Install crd (
kubectl apply -f crd.yaml
) - Run the following command:
kopf run lns.py --verbose
- Install crd (
kubectl apply -f crd.yaml
) - Use skaffold to build a container image and deploy the operator using manifests from k8s/base
skaffold run
Create a Custom Resource using one of the files in the examples/ directory.