Skip to content

dszortyka/minikservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minikube Services

minikservices is a small and very simple python project that aims to help with the start and stop of Minikube services.

Instead of creating multiple terminal tabs to expose minikube services, you can use kservice command line tool to start and stop services. It will also display the exposed services and its addresses.

Build/Dev local

git clone https://github.com/dszortyka/minikservices.git
cd minikservices
python3 -m venv .pyenv
source .pyenv/bin/activate
pip install -r requirements.txt
pip install . 
kservice -h

Python Package (PyPI)

pip install minikservices

Usage

kservice --start service1 service2
kservice --start service1 service2 -n namespace

kservice --stop service1 service2
kservice --stop service1 service2 -n namespace

kservice --startall
kservice --stopall

kservice --status

How it works

  • The application will start the minikube service in background and store and temp file in /tmp folder.
  • If you have an Application deployed in two different namespaces and run the --start operation without specifying the -n (namespace), it will start the application on both namespaces. The same is valid for --stop
  • --startall and --stopall works in the same way, it will start all services in all namespaces unless you specify which -n (namespace) in want.
  • --status will print a table with service names, namespace and the current URL for the exposed services.
❯ kservice --start simple-flask-app

❯ kservice --status
+-----------+-----------------------------------------+------------------------+
| Namespace |               Service Name              |          URL           |
+-----------+-----------------------------------------+------------------------+
|   argocd  |     argocd-applicationset-controller    |                        |
|   argocd  |            argocd-dex-server            |                        |
|   argocd  |              argocd-metrics             |                        |
|   argocd  | argocd-notifications-controller-metrics |                        |
|   argocd  |               argocd-redis              |                        |
|   argocd  |            argocd-repo-server           |                        |
|   argocd  |              argocd-server              |                        |
|   argocd  |          argocd-server-metrics          |                        |
|  default  |             simple-flask-app            | http://127.0.0.1:64888 |
|  flaskapp |             simple-flask-app            | http://127.0.0.1:64885 |
+-----------+-----------------------------------------+------------------------+

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages