Kubernetes in NodeJS

This project was/is an attempt to recreate the core functionality of v1.29.1 Kubernetes in NodeJS, while being fully compatible with the kubectl CLI. Though this project only implements some resources, the resources which were partially/fully implemented seem to be the most used (i.e. Pods, Services, etc) and the others may be implemented in the future.

Resources Partially Implemented

Pod (volume mounts are not supported)

ClusterRole

ClusterRoleBinding

Ingress

Role

RoleBinding

Endpoints (untested)

CertificateSigningRequest

Resources Fully Implemented

ConfigMap

Secret

Deployment

Namespace

Service

Requirements

It is also recommended you install kubectl, though it is not required

How to use

Install NodeJS and Docker Install the project dependencies by running npm i Create an .env file and set DB_URL to your MongoDB instance Run npm start (you may need to allow the start script to run by modifying the permissions of start.sh with chmod ) Set your kubectl to use this project by running kubectl config use-context /localhost:8080/admin in your shell Create Kubernetes resources with kubectl

Upon running the project you can use the examples in examples/helloworld or your own YAML to create resources.

Feel free to open an issue and/or make a PR if something is broken.