Build K8S on top of bhyve hypervisor
Build Kubernetes clusters on top of bhyve hypervisor
Features
- Bootstrap fully operable K8S cluster within one minute
- Build on single hoster or distributed multi-DC environment
- PV/PVC snapshot support
- Completely alternate stack: FreeBSD, VALE vswitch, Bhyve, CBSD
- Open-Source
- And this all FOR FREE
- Enjoy it!
How to use
You don't need to know command line and Unix basics. After installation, you will get an API box with a very simple interface.
The number of clusters is limited only by your resources.
# cluster list [you@home ~$] curl http://IP/clusters #get cluster create params: [you@home ~$] curl http://IP/params # create payload data for cluster create: [you@home ~$] cat k1.json { "init_masters": "1", "init_workers": "0", "master_vm_ram": "2g", "master_vm_cpus": "1", "master_vm_imgsize": "20g", "worker_vm_ram": "2g", "worker_vm_cpus": "1", "worker_vm_imgsize": "20g", "pv_enable": "1", "kubelet_master": "1", "email": "EMAIL", "callback: "https://callback_api" } # create cluster: [you@home ~$] curl -X POST -H "Content-Type: application/json" -d @k1.json http://IP/api/v1/create/test # get cluster status: [you@home ~$] curl http://IP/api/v1/status/test # download kubeconfig (when cluster ready, see status): [you@home ~$] curl http://IP/config/test.kubeconfig # destroy cluster: [you@home ~$] curl http://IP/api/v1/destroy/test
where:
init_masters | (mandatory) initial number of master nodes (can be increased as needed) |
init_workers | (mandatory) initial number of worker nodes (can be increased as needed) |
master_vm_ram | (mandatory) the amount of RAM of the master node (can be increased as needed) |
master_vm_cpus | (mandatory) the amount of vCPU of the master node (can be increased as needed) |
master_vm_imgsize | (mandatory) the amount of disk size of the master node (can be increased as needed) |
worker_vm_ram | (mandatory) the amount of RAM of the worker node (can be increased as needed) |
worker_vm_cpus | (mandatory) the amount of vCPU of the worker node (can be increased as needed) |
worker_vm_imgsize | (mandatory) the amount of disk size of the worker node (can be increased as needed). PV volume is not included. |
pv_enable | (mandatory) initialize persistent volume for the cluster? ([1]) |
send kubeconfig by email ([2]) | |
callback | when the cluster is created, call an external url (POST method) with a link to the kubeconfig. Useful when integrating with external API |
[1]: default PV size is 10G per cluster. Can be changed via config file or pv_spec_capacity_storage
[2]: sending kubeconfig by email works only with a correctly configured configuration file: /usr/local/etc/ssmtp/ssmtp.conf
Related demo and podcast
:CBSD K8S module without API
:K8S-bhyve FreeBSD internal (rus)
:Support the project
You can support K8S-bhyve development by donating to the CBSD/ClonOS project or via Bitclouds.sh platform. K8S-bhyve is not actually developed by the CBSD/ClonOS project, but the more hours spent on CBSD/ClonOS K8S-bhyve developers can bill, the more unpayed hours they can spend on K8S-bhyve-related activities.