OpenShift Mini Console (OMC) is a small Flask application that queries some basic information about an OpenShift cluster using the Python Kubernetes API module.
In addition to the web interface, you can make curl
calls to get cluster information as well.
- /infrastructure/name
- /infrastructure/platform
- /infrastructure/region
- /machinesets
- /nodes
- /clusterversion
- /clusterversion/channel
- /clusterversion/id
- /console
To run the application, clone this git repository on your workstation and run the following commands in the repository folder.
First we will create a Python virtual environment to use for the application.
python -m venv env
Next, activate the virtual environment as follows:
source env/bin/activate
OMC requires the Flask and Kubernetes Python modules, so upgrade pip and install the modules as follows:
python -m pip install --upgrade pip
python -m pip install flask
python -m pip install kubernetes
python -m pip install minio
Since we are running OMC locally, we need to export the KUBECONFIG environment variable.
export KUBECONFIG=/path/to/kubeconfig
Finally, start the Flask application by running:
$ python -m flask run
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
You should now be able to access the application by pointing your browser to http://localhost:5000.
The deploy/buildconfig
directory contains all the manifests required to build and deploy OMC on OpenShift. Simply clone this git repository and run the following command to apply the manifests:
oc apply -k deploy/buildconfig