Kubernetes History Visualization
Перейти к файлу
Thomas Hargrove b9774f47b7
Update README.md
2020-02-05 09:08:39 -08:00
helm/sloop Use Values.name for configMap name (#91) 2019-12-11 09:51:09 -08:00
other Updating screenshot (#89) 2019-12-09 16:03:09 -08:00
pkg/sloop Fix for Sloop garbage collection when its not able to successfully decrease the size on disk (#100) 2020-02-04 10:23:33 -08:00
providers/aws [providers/aws/sloop-to-eks.sh] Add 'profile' parameter (#95) 2020-01-24 05:00:46 +05:30
.dockerignore Add .git to .dockerignore (#46) 2019-10-16 17:32:10 -07:00
.gitignore Initial commit 2019-09-30 09:17:31 -07:00
.travis.yml Enable auto push of docker images (#69) 2019-11-15 13:17:31 -08:00
CODE_OF_CONDUCT.md Initial commit 2019-09-30 09:17:31 -07:00
CONTRIBUTING.md Initial commit 2019-09-30 09:17:31 -07:00
Dockerfile Added aws-iam-authenticator to docker and a launch script (#73) 2019-11-21 18:34:27 -08:00
LICENSE.txt Initial commit 2019-09-30 09:17:31 -07:00
Makefile Enable auto push of docker images (#69) 2019-11-15 13:17:31 -08:00
README.md Update README.md 2020-02-05 09:08:39 -08:00
go.mod Add better badger debugging (#101) 2020-01-31 00:08:34 +05:30
go.sum Update badger to v2 (#92) 2020-01-04 00:38:09 +05:30
prometheus.yml Initial commit 2019-09-30 09:17:31 -07:00

README.md

Sloop - Kubernetes History Visualization

Build Status Go Report Card Docker Pulls


Sloop monitors Kubernetes, recording histories of events and resource state changes and providing visualizations to aid in debugging past events.

Key features:

  1. Allows you to find and inspect resources that no longer exist (example: discover what host the pod from the previous deployment was using).
  2. Provides timeline displays that show rollouts of related resources in updates to Deployments, ReplicaSets, and StatefulSets.
  3. Helps debug transient and intermittent errors.
  4. Allows you to see changes over time in a Kubernetes application.
  5. Is a self-contained service with no dependencies on distributed storage.

Screenshots

Screenshot1

Architecture Overview

Architecture

Install

Sloop can be installed using any of these options:

Helm Chart

Users can install sloop by using helm chart now, for instructions refer helm readme

Precompiled Binaries

Build from Source

Building Sloop from source needs a working Go environment with version 1.13 or greater installed.

Clone the sloop repository and build using make:

mkdir -p $GOPATH/src/github.com/salesforce
cd $GOPATH/src/github.com/salesforce
git clone https://github.com/salesforce/sloop.git
cd sloop
make
$GOPATH/bin/sloop

When complete, you should have a running Sloop version accessing the current context from your kubeConfig. Just point your browser at http://localhost:8080/

Other makefile targets:

  • docker: Builds a Docker image.
  • cover: Runs unit tests with code coverage.
  • generate: Updates genny templates for typed table classes.
  • protobuf: Generates protobuf code-gen.

Local Docker Run

To run from Docker you need to host mount your kubeconfig:

make docker
docker run --rm -it -p 8080:8080 -v ~/.kube/:/kube/ -e KUBECONFIG=/kube/config sloop

In this mode, data is written to a memory-backed volume and is discarded after each run. To preserve the data, you can host-mount /data with something like -v /data/:/some_path_on_host/

Local Docker Run and connecting to EKS

This is very similar to above but abstracts running docker with AWS credentials for connecting to EKS

make docker
export AWS_ACCESS_KEY_ID=<access_key_id> AWS_SECRET_ACCESS_KEY=<secret_access_key> AWS_SESSION_TOKEN=<session_token>
./providers/aws/sloop_to_eks.sh <cluster name>

Data retention policy stated above still applies in this case.

Backup & Restore

This is an advanced feature. Use with caution.

To download a backup of the database, navigate to http://localhost:8080/data/backup

To restore from a backup, start sloop with the -restore-database-file flag set to the backup file downloaded in the previous step. When restoring, you may also wish to set the -disable-kube-watch=true flag to stop new writes from occurring and/or the -context flag to restore the database into a different context.

Contributing

Refer to CONTRIBUTING.md

License

BSD 3-Clause