|
1 month ago | |
---|---|---|
app | 6 months ago | |
deploy | 1 month ago | |
docs | 10 months ago | |
examples | 4 years ago | |
kube_ops_view | 6 months ago | |
tests | 10 months ago | |
.dockerignore | 1 year ago | |
.flake8 | 1 year ago | |
.gitattributes | 2 years ago | |
.gitignore | 1 year ago | |
.pre-commit-config.yaml | 10 months ago | |
.travis.yml | 1 year ago | |
Dockerfile | 10 months ago | |
LICENSE | 4 years ago | |
Makefile | 10 months ago | |
README.md | 5 months ago | |
kube-ops-view-logo.png | 4 years ago | |
kube-ops-view-logo.svg | 4 years ago | |
poetry.lock | 7 months ago | |
pyproject.toml | 10 months ago | |
screenshot.png | 4 years ago |
Goal: provide a common operational picture for multiple Kubernetes clusters.
What it is not:
You can run the app locally with kubectl proxy
against your running
cluster:
$ kubectl proxy &
$ docker run -it --net=host hjacobs/kube-ops-view
If you are using Docker for Mac, this needs to be slightly different in order to navigate the VM/container inception:
$ kubectl proxy --accept-hosts '.*' &
$ docker run -it -p 8080:8080 -e CLUSTERS=http://docker.for.mac.localhost:8001 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
You can find example Kubernetes manifests for deployment in the deploy
folder. It should be as simple as:
$ kubectl apply -k deploy # apply all manifests from the folder
Afterwards you can open "kube-ops-view" via kubectl port-forward:
$ kubectl port-forward service/kube-ops-view 8080:80
Now direct your browser to http://localhost:8080/
Kubernetes Operational View is also available as a Helm Chart.
The app can be started in "mock mode" to work on UI features without running any Kubernetes cluster:
$ pipenv install && pipenv shell
$ (cd app && npm start &) # watch and compile JS bundle
$ python3 -m kube_ops_view --mock --debug
The provided Makefile
will generate a Docker image by default:
$ make
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.
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.
SCOPE
Optional scope specifies level of access that the application is requesting.
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
.
NODE_LINK_URL_TEMPLATE
Template to make Nodes clickable, e.g. can point to
kube-web-view.
{cluster}
(cluster ID) and {name}
(Node name) will be replaced
in the URL template.
POD_LINK_URL_TEMPLATE
Template to make Pods clickable, e.g. can point to
kube-web-view.
{cluster}
(cluster ID), {namespace}
(Pod's namespace), and
{name}
(Pod name) will be replaced in the URL template.
ROUTE_PREFIX
The URL prefix under which kube-ops-view is externally reachable (for example, if kube-ops-view is served via a reverse proxy). Used for generating relative and absolute links back to kube-ops-view itself. If the URL has a path portion, it will be used to prefix all HTTP endpoints served by kube-ops-view. If omitted, relevant URL components will be derived automatically.
The UI uses WebGL, ECMAScript 6, and EventSource features. The following browsers are known to work:
See the ECMAScript 6 Compatibility Table for details on supported browser versions.
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.
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/.