GithubHelp home page GithubHelp logo

isabella232 / kube-ops-view Goto Github PK

View Code? Open in Web Editor NEW

This project forked from stakater/kube-ops-view

0.0 0.0 0.0 843 KB

Kubernetes Operational View - read-only system dashboard for multiple K8s clusters

Home Page: https://kubernetes-operational-view.readthedocs.io/

License: GNU General Public License v3.0

JavaScript 59.84% Python 37.22% Makefile 1.12% HTML 1.82%

kube-ops-view's Introduction

Kubernetes Operational View

Travis CI Build Status Documentation Status

This project is in a very early state, but it might already be useful.

Screenshot

Goal: provide a common operational picture for multiple Kubernetes clusters.

  • Render nodes and indicate their overall status ("Ready")
  • Show node capacity and resource usage (CPU, memory)
    • Render one "box" per CPU and fill up to sum of pod CPU requests/usage
    • Render vertical bar for total memory and fill up to sum of pod memory requests/usage
  • Render individual pods
    • Indicate pod status by border line color (green: ready/running, yellow: pending, red: error etc)
    • Show current CPU/memory usage (gathered from Heapster) by small vertical bars
    • System pods ("kube-system" namespace) will be grouped together at the bottom
  • Provide tooltip information for nodes and pods
  • Animate pod creation and termination

What it is not:

  • It's not a replacement for the Kubernetes Dashboard. The Kubernetes Dashboard is a general purpose UI which allows managing applications.
  • It's not a monitoring solution. Use your preferred monitoring system to alert on production issues.
  • It's not a operation management tool. Kubernetes Operational View does not allow interacting with the actual cluster.

Usage

Running Locally

You can run the app locally with kubectl proxy against your running cluster:

$ kubectl proxy &
$ docker run -it --net=host hjacobs/kube-ops-view

Now direct your browser to http://localhost:8080

You can also try the UI with the integrated mock mode. This does not require any Kubernetes cluster access:

$ docker run -it -p 8080:8080 hjacobs/kube-ops-view --mock

Installation

You can find example Kubernetes manifests for deployment in the deploy folder. It should be as simple as:

$ kubectl apply -f deploy  # apply all manifests from the folder

Afterwards you can open "kube-ops-view" via the kubectl proxy:

$ kubectl proxy

Now direct your browser to http://localhost:8001/api/v1/proxy/namespaces/default/services/kube-ops-view/

Kubernetes Operational View is also available as a Helm Chart.

Development

The app can be started in "mock mode" to work on UI features without running any Kubernetes cluster:

$ pip3 install -r requirements.txt
$ (cd app && npm start &)  # watch and compile JS bundle
$ python3 -m kube_ops_view --mock --debug

Building

The provided Makefile will generate a Docker image by default:

$ make

Multiple Clusters

Multiple clusters are supported by passing a list of API servers, reading a kubeconfig file or pointing to an HTTP Cluster Registry endpoint.

See the documentation on multiple clusters for details.

Configuration

The following environment variables are supported:

AUTHORIZE_URL
Optional OAuth 2 authorization endpoint URL for protecting the UI.
ACCESS_TOKEN_URL
Optional token endpoint URL for the OAuth 2 Authorization Code Grant flow.
CLUSTERS
Comma separated list of Kubernetes API server URLs. It defaults to http://localhost:8001/ (default endpoint of kubectl proxy).
CLUSTER_REGISTRY_URL
URL to cluster registry returning list of Kubernetes clusters.
CREDENTIALS_DIR
Directory to read (OAuth) credentials from --- these credentials are only used for non-localhost cluster URLs.
DEBUG
Set to "true" for local development to reload code changes.
KUBECONFIG_PATH
Path to kubeconfig file to use for cluster access.
KUBECONFIG_CONTEXTS
Comma separated list of contexts to use when reading the kubeconfig file from KUBECONFIG_PATH.
MOCK
Set to "true" to mock Kubernetes cluster data.
QUERY_INTERVAL
Interval in seconds for querying clusters (default: 5). Each cluster will at most queried once per configured interval.
REDIS_URL
Optional Redis server to use for pub/sub events and job locking when running more than one replica. Example: redis://my-redis:6379
SERVER_PORT
HTTP port to listen on. It defaults to 8080.

Supported Browsers

The UI uses WebGL, ECMAScript 6, and EventSource features. The following browsers are known to work:

  • Chrome/Chromium 53.0+
  • Mozilla Firefox 49.0+

See the ECMAScript 6 Compatibility Table for details on supported browser versions.

Contributing

Easiest way to contribute is to provide feedback! We would love to hear what you like and what you think is missing. Create an issue or ping try_except_ on Twitter.

PRs are welcome. Please also have a look at issues labeled with "help wanted".

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

kube-ops-view's People

Contributors

aermakov-zalando avatar christianlohmann avatar hjacobs avatar rafaelcaricio avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.