Code Monkey home page Code Monkey logo

spekt8's Introduction

SPEKTportfolio_view

SPEKT8 is a new visualization tool for your Kubernetes clusters. It automatically builds logical topologies of your application and infrastructure, which enable your SRE and Ops team to intuitively understand, monitor, and control your containerized, microservices based application. Simply deploy our containerized application directly into your Kubernetes cluster.

When your app is running in Kubernetes, our visualization tool will display all the Pods, Services, and Ingresses that allow you to drill down on Kubernetes clusters. The information provided to you includes but is not limited to the following:

  • Indicates the status of pods (blue for running, yellow for pending)
  • Lists the specific container images running within pods
  • Provides information on ingresses and services (Nodeport, load balancer, cluster-ip, persistent volume claims, persistent volumes, etc.)

While the current app does not directly visualize any controllers (such as Deployments, Daemon Sets, Replication Controllers) it does indirectly visualize them through their pods. We are continuously building more support for additional Kubernetes objects.

In addition to these views, nodes can be presented either in graphical or in table mode. The graphical mode is practical for obtaining a quick visual overview of your app, and its infrastructure and connections between all of the nodes. And when you switch to table mode, nodes are presented in a convenient list that displays the resources being consumed by processes, containers, and hosts.

Deployment

These instructions presume you have a Kubernetes cluster already running.

An image of the application has been pushed to Docker Hub for those who would like to build the image directly from the public repository.

We are also providing a deployment file that you can apply directly to your Kubernetes cluster using the command line.

In addition, in order to allow reading resources of the API, you must configure a set of permissions. We have set up a YAML file using RBAC authorization which you can apply directly to your Kubernetes cluster using the command line:

Then, open your web browser to http://localhost:3000.

How to Use

Navigation

  • Use arrow keys for movement
  • Use the ‘-’ or ‘+’ for zoom

Legend

  • Use the switch icons next to the legend to filter based on Object Types

Graph

  • Click on Pods/Services/Ingresses to see more detailed information about the selected Object

View

  • Use the View dropdown to toggle between Graph and Table Views

Built With

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

spekt8's People

Contributors

ed-roh avatar elliotxkim avatar jamesvillarrubia avatar stevefan1999-personal 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

spekt8's Issues

Ingress-rules not displayed (just the default host)

I have the following Ingress configuration (which is working):

---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress1
  annotations:  
    kubernetes.io/ingress.class: nginx
    certmanager.k8s.io/cluster-issuer: letsencrypt-prod
spec:
  tls:
  - hosts:
    - nginx-ingress1.example.com
    - nginx-ingress2.example.com
    secretName: letsencrypt-prod
  backend:
    serviceName: nginx-example1
    servicePort: 80
  rules:
  - host: nginx-ingress1.example.com
    http:
      paths: 
      - path: /
        backend:
          serviceName: nginx-example1
          servicePort: 80
  - host: nginx-ingress2.example.com
    http:
      paths: 
      - path: /
        backend:
          serviceName: nginx-example2
          servicePort: 80

So there are two hosts (mapped to two services) plus a default host (mapped to one of the services).

Unfortunately spekt8 only renders the default host:

selection_768

My expectation is that this Ingress is supposed to point at both services.


(I am new to kubernetes, so I am not sure if I used the correct terms for the mentioned concepts, e.g. "Ingress rule" and "default host".)

fabric8-rbac rolebinding is over-permissive

Cluster-admin, really?
I admit I haven't done a deep dive on the code, but surely something that gets, lists and watches cluster state doesn't need permission to edit and delete everything in the cluster!

No output; error in logs

Hi, after installing the rbac and deployment from the docs, I see this in the pod logs:

> [email protected] server /usr/src/app
> nodemon src/server/server.js

[nodemon] 1.18.6
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node src/server/server.js`
Listening on port 3000....
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:39) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)

The site works and serves a UI, but has no pods/ingresses/services. Am I doing something wrong?

Spekt8 doesn't show my pods, services and ingress

localhost:3000/pods shows my pods, but localhost:3000 shows an empty area in the middle in graph mode and shows no pods in table mode.

I'm using the latest spekt8 with the latest minikube/docker on windows 10.

pod, service etc. JSON responses seem correct, yet nothing is visualised in the UI

Summary:
Nothing's displayed in the UI despite /pod /service /ingress etc. json responses seem to contain all the necessary data about respective resources.

Details:
I'm on 18.04.1-Ubuntu using minikube version: v1.4.0
As per instructions, I've downloaded the two supplied yaml files and applied them:

kubectl apply -f fabric8-rbac.yaml
kubectl apply -f spekt8-deployment.yaml
kubectl port-forward deployment/spekt8 3000:3000

Everything's running locally in the default cluster.

On http://localhost:3000/ I can see
Screenshot from 2019-10-13 15-45-05

(note the TypeError)

I can see all the pods, services etc. coming through in the json responses, yet nothing's displayed in the UI.

I can see the following in the logs:

[nodemon] 1.18.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node src/server/server.js`
Listening on port 3000....
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:39) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:39) UnhandledPromiseRejectionWarning: #<Object>
(node:39) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
(node:39) UnhandledPromiseRejectionWarning: #<Object>

I've tried to create a different (other than default:default) role, that didn't help either, although I suspect if the json responses have the data, it's not a permission issue.

Any pointers to what I might be doing wrong and how to resolve?

any way to see pod names instead of "Pods" ?

services show the names on the graph (no need to open a service to see the name), but pods just show "Pods".
Is there any way to see the real pod name without having to click on a pod?

UnhandledPromiseRejectionWarning / daemonset REST Endpoint Failure

First time using this project. I've gone ahead and deployed ti with the RBAC and I am getting results on the other endpoints but the daemonset endpoint is not working, as shown below an unhandled promise rejection is causing the issue, I see that pr #20 has been merged to fix this kind of an issue but the docker image hasn't been updated for the past 2 years, so is a public build release going to be made with the missing changes?

spekt8 [nodemon] watching: *.*                                                                                                                                                                                             │
│ spekt8 [nodemon] starting `node src/server/server.js`                                                                                                                                                                      │
│ spekt8 Listening on port 3000....                                                                                                                                                                                          │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: #<Object>                                                                                                                                                               │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)                                                                                                                                                                                         │
│ spekt8 (node:38) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.           │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: #<Object>                                                                                                                                                               │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)                                                                                                                                                                                         │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: #<Object>                                                                                                                                                               │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)                                                                                                                                                                                         │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: #<Object>                                                                                                                                                               │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)                                                                                                                                                                                         │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: #<Object>                                                                                                                                                               │
│ spekt8 (node:38) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)           

Can't rebuild the project

Each time I run:

npm run-script build --loglevel verbose

To build the project I get this:

`

webpack
Hash: e3bf32caefe7e505916a
Version: webpack 4.41.2
Time: 822ms
Built at: 2019-10-17 17:46:26
1 asset
Entrypoint main = main.js
[0] ./src/index.js 302 bytes {0} [built] [failed] [1 error]
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: Unexpected token (25:1)
23 |
24 | ReactDOM.render(
25 |
| ^
26 |
27 |
28 |
Child html-webpack-plugin for "index.html":
1 asset
Entrypoint undefined = ./index.html
[0] ./node_modules/html-webpack-plugin/lib/loader.js!./src/index.html 1.1 KiB {0} [built]
[2] (webpack)/buildin/global.js 472 bytes {0} [built]
[3] (webpack)/buildin/module.js 497 bytes {0} [built]
+ 1 hidden module
npm verb lifecycle [email protected]build: unsafe-perm in lifecycle true
npm verb lifecycle [email protected]
build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
npm verb lifecycle [email protected]build: CWD: /pystol-ui
npm info lifecycle [email protected]
build: Failed to exec build script
npm verb stack Error: [email protected] build: webpack
npm verb stack Exit status 2
npm verb stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
npm verb stack at emitTwo (events.js:126:13)
npm verb stack at EventEmitter.emit (events.js:214:7)
npm verb stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
npm verb stack at emitTwo (events.js:126:13)
npm verb stack at ChildProcess.emit (events.js:214:7)
npm verb stack at maybeClose (internal/child_process.js:915:16)
npm verb stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
npm verb pkgid [email protected]
npm verb cwd /pystol-ui
npm verb Linux 3.10.0-123.el7.x86_64
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "run-script" "build" "--loglevel" "verbose"
npm verb node v8.16.2
npm verb npm v6.4.1
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! [email protected] build: webpack
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm verb exit [ 2, true ]
npm timing npm Completed in 2044ms
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-10-17T17_46_26_869Z-debug.log
---> 3c8d036b342b
Removing intermediate container e113d2784172
Step 7/9 : RUN file="$(ls -1 /root/.npm/_logs)" && cat "/root/.npm/_logs/$file"
---> Running in 513064ebd76a
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run-script',
1 verbose cli 'build',
1 verbose cli '--loglevel',
1 verbose cli 'verbose' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle [email protected]prebuild: [email protected]
6 info lifecycle [email protected]
build: [email protected]
7 verbose lifecycle [email protected]build: unsafe-perm in lifecycle true
8 verbose lifecycle [email protected]
build: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/pystol-ui/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
9 verbose lifecycle [email protected]build: CWD: /folder
10 silly lifecycle [email protected]
build: Args: [ '-c', 'webpack' ]
11 silly lifecycle [email protected]build: Returned: code: 2 signal: null
12 info lifecycle [email protected]
build: Failed to exec build script
13 verbose stack Error: [email protected] build: webpack
13 verbose stack Exit status 2
13 verbose stack at EventEmitter. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess. (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid [email protected]
15 verbose cwd /folder
16 verbose Linux 3.10.0-123.el7.x86_64
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run-script" "build" "--loglevel" "verbose"
18 verbose node v8.16.2
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 2
22 error [email protected] build: webpack
22 error Exit status 2
23 error Failed at the [email protected] build script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 2, true ]
---> 419e7929209c
Removing intermediate container 513064ebd76a
Step 8/9 : EXPOSE 3000
---> Running in 0dfcc42f157e
---> cebf07c34b0b
Removing intermediate container 0dfcc42f157e
Step 9/9 : CMD npm run server --loglevel verbose
---> Running in bdb7f3e56c3a
---> f682739bbb9b
Removing intermediate container bdb7f3e56c3a
Successfully built f682739bbb9b
`

Do you know what can be wrong?

It does not work with NodePort configuration (localhost:3000 is hardcoded)

Because of network and firewall and other reasons, I can't just do
kubectl port-forward deployment/spekt8 3000:3000

Instead I had to install it using NodePort.

Now spekt8 shows me a blank screen for it tries to access localhost:3000 instead of THE_IP_ADDRESS:THE_PORT (i.e. this localhost:3000 is harcoded)

below are the YAML settings I used to install it:



---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: spekt8
spec:
  selector:
    matchLabels:
      k8s-app: spekt8
  replicas: 1
  template:
    metadata:
      labels:
        k8s-app: spekt8
    spec:
      containers:
        - name: spekt8
          image: elliotxkim/spekt8
          ports:
            - containerPort: 3000

---
kind: Service
apiVersion: v1
metadata:
  name: spekt8
  labels:
    k8s-app: spekt8
spec:
  ports:
  - protocol: TCP
    port: 3000
  type: NodePort
  selector:
    k8s-app: spekt8

Local installation using Docker

Hello,

Is local installation of this application supported? I would like to run it using the local Kubernetes context. I wrote such a Docker command, but I am not sure if it is correct. Could someone confirm this?

docker run \
    --rm \
    --publish 3000:3000
    -v "${KUBECONFIG:-"$HOME/.kube/config"}:/root/.kube/config"
    elliotxkim/spekt8:latest

Best regards,
Kamil Breguła

Dockerhub image is not up to date

Hi,

The dockerhub image is not up to date with where teh repo is at. For example, it's missing the hardcoded localhost pr. Any chance you can push up the latest?

Thanks,
Jas

Image only built for AMD64 ?

Hi,
it seems the image in docker hub is only for AMD64. I wanted to try spek8t on a k3s cluster running on RPI4. Is there a chance to have builds for other arch ?

Best regards,
Edouard

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.