Git Product home page Git Product logo

hjacobs / kube-ops-view Goto Github PK

View Code? Open in Web Editor NEW
1.8K 66.0 257.0 1.16 MB

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

Python 35.10% HTML 1.69% JavaScript 61.00% Makefile 1.53% Dockerfile 0.67%
kubernetes kubernetes-monitoring admin-dashboard

kube-ops-view's Introduction

kube-ops-view's People

Contributors

aermakov-zalando avatar christianlohmann avatar dependabot[bot] avatar elblivion avatar hjacobs avatar jarik2995 avatar lanycrost avatar mcasperson avatar nilsket avatar pettersolberg88 avatar phillebaba avatar rafaelcaricio avatar rapenchukd avatar shubhindia avatar tmszdmsk avatar tomislater avatar uanid avatar wms avatar zerkms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kube-ops-view's Issues

Search/filter: unassigned pods are not considered

Unassigned pods are not "greyed out" when filtering.

This screenshot shows one unassigned pod which does not match the "doesnotmatchanything" string, but it's still shown in yellow (instead of grey):
screenshot_2016-12-20_22-06-16

Indicate if backend could not reach Kubernetes API server

We currently have no indication in the frontend whether the Kubernetes data is outdated (cached in Redis) or not. Calls to the API server could fail for various reasons, the user should immediately know about it.

Store last snapshot time?

Sort pods by name?

Pods are currently unsorted, they are displayed in the same order as returned by the Kubernetes API server.

Should we sort them by name to be consistent? Or should we sort them by creation timestamp?

/cc @ChristianLohmann @shuaibiyy

Tooltip for node meters

Node meters should have tooltips showing actual values (like 500 MiB of 16 GiB memory used).

Reduce Docker image size: remove node.js build stuff

All the node.js modules and node itself are kept in the final Docker image --- we should get rid of it.

Only install nodejs and modules before the npm build and remove it afterwards (all in one RUN command).

Do not require kubectl proxy: allow reading kubeconfig file

Try to read ~/.kube/config by default and use it to directly connect to the default context thus not requiring kubectl proxy anymore.

Also add --kubeconfig-path option to read arbitrary kubeconfig file containing credentials (possibly client certs #72).

Theme switcher

Allow switching "themes" (colors) to make everyone happy.

Allow filtering clusters / showing single cluster on screen

Users should be able to filter the view by cluster:

  • clicking on the cluster title bar should "maximize" this single cluster, i.e. only showing this one cluster on screen
  • clicking on a new "minimize" button in the cluster title bar should hide the cluster
  • the cluster selection should be persisted in the location hash
  • only the data for the selected cluster(s) should be loaded from the backend

Stabilize frontend JS for running 24x7

The current UI causes browser crashes (Firefox and Chromium) after a few hours ๐Ÿ˜ž

Options:

  • find the memory leak or whatever it is...
  • add safety guards like regular page refreshes

Smarter way of API polling / state updates

Full Kubernetes state is polled on every request, this works for small clusters and few clients.
Consider possible improvements:

  • keep state in backend and poll in background (decouple frontend requests from API requests)
  • watch Kubernetes resources and update local state as needed
  • use something like WebSockets to push updates to JS client

Exponential backoff for querying failing Kubernetes clusters

Retrying failing/unreachable clusters every time just spams the log and won't help anybody. This is especially interesting for the --kubeconfig-path option (#95) as users might have any number of "old" context entries in ~/.kube/config (where only a subset of them might actually work).

Do not throw exception if Heapster metrics are not available yet (NoneType object is not iterable)

kubectl top nodes
...
I0110 10:21:57.938861    8278 round_trippers.go:318] GET https://my-cluster/api/v1/proxy/namespaces/kube-system/services/http:heapster:/apis/metrics/v1alpha1/nodes?labelSelector= 200 OK in 210 milliseconds
I0110 10:21:57.938910    8278 round_trippers.go:324] Response Headers:
I0110 10:21:57.938920    8278 round_trippers.go:327]     Content-Type: application/json
I0110 10:21:57.938928    8278 round_trippers.go:327]     Date: Tue, 10 Jan 2017 09:21:57 GMT
F0110 10:21:57.941378    8278 helpers.go:116] error: metrics not available yet

The URL http://localhost:8001/api/v1/namespaces/kube-system/services/heapster/proxy/apis/metrics/v1alpha1/nodes might return null as the value of `items. We should handle this instead of throwing an exception:

10.2.15.0 - - [2017-01-10 09:19:07] "GET /kubernetes-clusters?id= HTTP/1.1" 404 342 0.001122
ERROR:root:Failed to get metrics
Traceback (most recent call last):
  File "/app.py", line 290, in get_kubernetes_clusters
    for metrics in response.json()['items']:
TypeError: 'NoneType' object is not iterable

Services and Ingress

Services and Ingress can/should also be included in the Kubernetes Operational View:

  • draw services as entities inside of cluster, but outside any node
  • indicate number of service endpoints (no endpoints = red / unhealthy)
  • draw ingress on cluster boundary
  • indicate ingress metrics (proprietary, depends on ingress implementation e.g. Skipper metrics)

Onscreen help/tutorial/tips

A lot of information is contained in the cluster visualization. There should be an onscreen help/tutorial showing the most important aspects:

  • explain the node resource bars (CPU/memory, requested/used)
  • explain the different pod states and colors

Add mock mode with example Kubernetes data

We should have a mock mode which provides sample Kubernetes data:

  • good for developing the UI (dependable data)
  • good for other people to try out without having to run Kubernetes

Python package

Organize code cleanly into a Python package instead of having everything in app.py.

Animate pod scheduling

Pods are in "Pending" state until they get a node assigned by the Kubernetes scheduler. Unassigned pods should be shown and animated ("flying to") the assigned node.

Dynamic layout / sizing

Cluster and node sizes need to be completely dynamic. The current node box width/height is hardcoded.

Support for client-side certificates

In our Kubernetes clusters, we use client-side certs for authentication. I see that in the Readme it states:

Note that authentication via client-certificates is currently not supported!

It would be great if that could be added.

In general, it would be great if the app could read a kubeconfig file. Then you could specify a comma-separated lists of contexts to connect to via command-line arg or environment variable.

Documentation

Create some initial documentation:

  • How to configure / set up
  • User guide / how to interpret the UI

Visualize pod metrics

Pod metrics such as CPU and memory usage (collected via Heapster) should be visible.

Lookup clusters in Cluster Registry

The list of Kubernetes clusters should not be hardcoded on startup, but instead a lookup to some "Cluster Registry" should be performed regularly (to "discover" new clusters).

The endpoint for the Cluster Registry would look like:

curl https://my-cluster-registry.example.org/kubernetes-clusters
{"items": [{"id": "my-cluster1-id", "api_server_url": "https://cluster1.example.org", "lifecycle_status": "ready"}]}

Only Kubernetes clusters having lifecycle_status value ready should be considered.

Idea: add search/filter box

It would be helpful to have a small search box at the top to filter pods/nodes by query string to quickly find something. We could use some black/white or blur filter to hide all non-matching pods/nodes.

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.