Skip to content

Automatic deployment of tenant applications to k8s separated by namespaces

Notifications You must be signed in to change notification settings

EdwinWalela/k8s-multitenancy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Multi-tenancy on Kubernetes

Automatic deployment of tenant applications to k8s separated by namespaces

Project Structure

App

Tenant application

  • REST API
  • MySQL DB

Helm Chart

K8s template for tenant application

Provisioner

REST API responsible for deploying tenant application into a specified namespace

Requirements

  • Helm

  • Minikube cluster running locally

  • Kubectl

Setup

  1. Run Provisioner

  2. cd provisioner

  3. go run main.go

Provisioner runs on localhost:7000

Creating tenants using Provisioner API

/ POST

request body:

ns - Namespace to deploy tenant application

port - Nodeport for service (30000-32768)

{
    "ns": "namespace"
    "port": "30000"
}

View created namespaces

kubectl get namespace

View pods in created namespace

kubectl get pods -n [namespace]

View services in created namespace

kubectl get services -n [namespace]

Provide external IP to deployment

minikube service clients -n [namespace]

About

Automatic deployment of tenant applications to k8s separated by namespaces

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published