Nanokube is Nanotube on Kubernetes.
Nanotube can be run on kubernetes as a daemonset; each of the pods of nanokube daemonset accept and receive the traffic from the pods residing on the same node. In order for nanokube to be able to open local ports inside other pods, the nanokube pods should be privileged. See nanokube-daemonset manifest for details.
In order to test how nanokube works, you can run a local kubernetes cluster using kind.
An ansible playbook is prepared to deploy a kubernetes cluster running nanokube instances locally and some test senders which generate load on them.
- Install kind.
- Install kubernetes python library:
pip install kubernetes
- Install ansible collections for kubernetes:
ansible-galaxy collection install kubernetes.core
ansible-galaxy collection install community.kubernetes
ansible-galaxy collection install cloud.common
- Run the ansible playbook:
ansible-playbook launch.yml
Note: This section is optional. The cluster will be up and running after last step. Proceed if you need the monitoring in place.
- Add prometheus-operator to the cluster:
kubectl create -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/release-0.60/bundle.yaml
- Add nanokube monitoring manifests:
kubectl create -f monitoring/
- In order to open the web UI of prometheus you can use port-forward:
kubectl -n default port-forward prometheus-nk-prometheus-0 9090:9090
For cleaning up the cluster, you can easily use delete-cluster playbook:
ansible-playbook delete-cluster.yml