Giter VIP home page Giter VIP logo

kubernetes-demo's Introduction

Kubernetes Container Visualizer

This simple visualizer shows a set of pods related to services based on a namespace.

It is based on the gcp-live-visualizer but with some modifications.

Pre-Requisites

  • Kubernetes cluster
  • Access to Kubernetes proxy via kubectl

Setup Instructions

  1. Go into this repository.
  2. Target the Kubernetes cluster using kubectl.
  3. Create a deployment & service with a demo label, complete with the application name. If you want to show dependencies, you can use the uses label with a comma-separated list to point to other services the pods need to use.
  4. Start the visualization. This requires access to the Kubernetes proxy.
    make visualize
    
  5. Go to http://127.0.0.1:8001/visualize/.

Demo Instructions

There are two scripts that need to be run for the demo. One can be run in the background to kill pods, while the other checks the endpoints to ensure it remains alive and well.

  1. Make sure the Kubernetes proxy and visualizer are up.
  2. Run whac-a-pod.sh. This takes a service and namespace and deletes a random number of pods.
    bash whac-a-pod.sh [service name] [optional: namespace, default] [optional: deletion interval, 10 seconds]
    
  3. In a separate shell, run check-endpoint.sh. This is an infinite loop that checks the API endpoint of a service to ensure it is up.
    bash check-endpoint.sh [service name] [API endpoint] [optional: ':port'] [optional: namespace, default]
    
  4. Open the visualizer on one side and the check-endpoint script on the other.

Configurations

  • If you want to point to a different namespace, you must go into script.js and edit the var namespace to use a separate one.
  • Deployments, pods, and services must have a demo label to show up.
  • Adding a uses label and a comma-separated list of services will visualize dependencies.

kubernetes-demo's People

Contributors

joatmon08 avatar

Watchers

James Cloos avatar  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.