Automatic deployment of tenant applications to k8s separated by namespaces
Tenant application
- REST API
- MySQL DB
K8s template for tenant application
REST API responsible for deploying tenant application into a specified namespace
-
Helm
-
Minikube cluster running locally
-
Kubectl
-
Run Provisioner
-
cd provisioner
-
go run main.go
Provisioner runs on localhost:7000
request body:
ns - Namespace to deploy tenant application
port - Nodeport for service (30000-32768)
{
"ns": "namespace"
"port": "30000"
}
kubectl get namespace
kubectl get pods -n [namespace]
kubectl get services -n [namespace]
minikube service clients -n [namespace]