Coder Social home page Coder Social logo

deployment_tools's Introduction

Spyderbat kubernetes deployment tools

This repository containers tooling to support the deployment and validation process of the spyderbat monitoring solution.

cluster_collect.py - Spyderbat pre-deployment collection script.

In order to optimally configure and size the Spyderbat collection agent and backend to support your kubernetes cluster, we have created a script that will collect some useful data and metrics that Spyderbat can review to optimize the Helm installation or our agents, and size our backend appropriately.

What does the script collect:


  1. summary metrics about the nr of nodes, pods, deployments, replicasets, daemonsets, services and namespaces

    This helps us assess the size and load on your cluster

  2. information about the nodes of the cluster, including their provisioned capacity and any taints applied to the nodes

    This helps us understand the headroom available in your cluster to add our agents, and helps us pro-actively recommend configuring tolerations on our agents to ensure visibility on all nodes

  3. Cumulative metrics about what resource requests currently running pods are requesting (cpu, memory)

    This helps us understand the headroom available in your cluster to add our agents.

  4. The name and namespaces of the deployments, daemonsets and services running on your cluster

    This helps us assess if any other daemonsets or deployments could interfere with our agents and helps us discover if your cluster has node-auto-scaling configured

  5. PriorityClasses currently present for the cluster

    This helps us assess whether our agent will have sufficient priority to get scheduled on any new nodes being added to the cluster

What this script does NOT collect:

We do not collect implementation and status details in the 'spec' and 'status' sections of the pods, deployments or daemonsets. No sensitive data that might be present in these sections of the k8s resources (environment variables, configs) is collected.

Requirements

This script should be run from a machine you currently use to manage your cluster from.

The following are required

  1. python3.7 or higher https://www.python.org/downloads/

  2. kubectl and a valid kube config file https://kubernetes.io/docs/tasks/tools/

    The script will call on the kubectl command to collect cluster information. The cluster(s) to install Spyderbat on should be one of the contexts configured in the kube config file.

Usage

After installing the script run it as

./cluster_collect.py -h
    OR
python3 cluster_collect.py -h

for usage info
usage: cluster_collect.py [-h] [-k KUBECONFIG] [-c CONTEXT] [-o OUTPUT]

options:
  -h, --help            show this help message and exit
  -k KUBECONFIG, --kubeconfig KUBECONFIG
                        path to kubeconfig file (if omitted, default is ~/.kube/config)
  -c CONTEXT, --context CONTEXT
                        kubectl context to pull from (if none provided, all contexts in the kubectl config will be analyzed)
  -o OUTPUT, --output OUTPUT
                        output file (default is spyderbat-clusterinfo.json.gz)

By default, the script will collect information for all clusters configured in your kubeconfig file. If you want to collect only for a single one, use the -c CONTEXT flag, with the name of the context (as available in kubectl config get-contexts) to collect for.

For example:

./cluster_collect.py -c qacluster1

by default the output will go into a file called spyderbat-clusterinfo.json.gz You can use the -o flag to use another filename.

After collection

If the script ran successfully, please send the output file back to Spyderbat. We will review the findings with you to discuss the next steps for your deployment.

deployment_tools's People

Contributors

spyder-guy avatar

Watchers

Brian Smith 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.