Spyderbat
Book a DemoStart FreeContact Us
  • Spyderbat Product Docs
  • Getting Started
    • Create an Organization
    • Install the Nano Agent
    • Three Things to Try with Spyderbat Community Edition
    • Manage Users and Roles
  • Installation
    • Spyderbat Nano Agent
      • Kubernetes
        • Pre Deployment Environment Data Collection Script
      • Linux Standalone
      • AWS Unattended Install
        • Secure your Registration Code with AWS Secrets Manager
      • Create a Golden Image with the Nano Agent Pre-Installed
    • Spyderbat AWS Agent
      • AWS Linux VM
      • Kubernetes
      • Configuration Guide - AWS Linux VM
      • Configuration Guide - Kubernetes
    • Install Spyctl CLI
      • Initial Configuration
    • Install Spydertop CLI
    • Install the Spyderbat Event Forwarder
      • Helm Chart
      • Traditional Installer
  • Concepts
    • Guardian & Interceptor
      • Ruleset Policies
      • Workload Policies
    • Flashback (Go Back In Time)
      • Investigations
    • Search
      • Saved Searches
    • Summarize
      • Spydertrace Summarize
    • Dashboards
      • Dashboard Categories
    • Reports
    • Notifications
      • Notification Targets
      • Notification Templates
    • Actions
    • Integrations
      • AWS Integration
      • Spyderbat Event Forwarder
    • Suppression & Tuning
    • Scout (Detections)
      • Custom Flags
  • Tutorials
    • Flashback
      • How to Use the Investigations Feature in Spyderbat
    • Guardian
      • How to Lock Down Your Workloads With Guardian Policies Using Spyctl
      • How to Put Guardrails Around Your K8s Clusters Using Spyctl
    • Integrations
      • How to Configure Event Forwarder Webhook for Panther
      • How to Set Up Spyderbat to Ingest Falco Alerts
      • How to Create and Use a Spyderbat API Key
    • Notifications
      • How to Set Up Notifications Using Spyctl
      • How to Set up Agent-Health Notifications Using Spyctl
    • Dashboards
    • Miscellaneous
      • How to Set Up Spyderbat to Monitor Systems From vulnhub.com
    • Scout (Detections)
      • How to Set Up Custom Flags Using Spyctl CLI
  • Reference
    • Policies
      • Response Actions
    • Rulesets
    • Selectors
    • Notifications
    • Spyctl CLI
      • Spyctl Commands
      • Guardian Policy Management using Spyctl
      • Notification Template Management using Spyctl
      • Notification Target Management using Spyctl
    • Search
      • All Operators
      • All Fields
      • All Related Objects
  • Quick Links
    • Contact Us
    • Try Spyderbat for Free
    • Book a Demo
Powered by GitBook

© SPYDERBAT, Inc., All Rights Reserved

On this page
  • What is Pre-Deployment Collection Script and How It Works
  • Script Output Details
  • Script Execution Prerequisites
  • Script Execution Steps
  • Output Delivery and Review

Was this helpful?

Export as PDF
  1. Installation
  2. Spyderbat Nano Agent
  3. Kubernetes

Pre Deployment Environment Data Collection Script

Optimize your Helm Chart values to ensure proper sizing of the Spyderbat Nano Agent parameters for your K8s environment.

What is Pre-Deployment Collection Script and How It Works

To optimally configure and size the Spyderbat Nano 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 Spyderbat backend appropriately.

Script Output Details

The script collects the following data in your environment:

  1. Summary metrics about the number of nodes, pods, deployments, replicasets, daemonsets, services and namespaces, which 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, which 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), which 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, which 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 which helps us assess whether our agent will have sufficient priority to get scheduled on any new nodes being added to the cluster.

The script does NOT collect any of the following:

  • Implementation and status details in the 'spec' and 'status' sections of the pods, deployments or daemonsets.

  • Any sensitive data that might be present in these sections of the k8s resources (environment variables, configs)

Script Execution Prerequisites

Spyderbat Pre-Deployment Collection script should be run from a machine you currently use to manage your cluster from.

Below are the requirements for the script to run successfully:

  1. 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.

Script Execution Steps

After installing the script run it as

./cluster_collect.py -h

OR

python3 cluster_collect.py -h\

For usage info run

usage: cluster_collect.py [-h] [-c CONTEXT] [-o OUTPUT]

Here are available options:

  • -h, --help show this help message and exit\

  • -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 one cluster, 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.

Output Delivery and Review

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 and provide recommendations on how to best configure your deployment parameters to ensure that all Spyderbat Nano Agents come online, initialize fully, and successfully register with the Spyderbat backend.

Here is an example of the output file data:

Last updated 1 year ago

Was this helpful?

python3 \

kubectl and a valid kube config file

First you will need to download the cluster_collect.py script from .

If you would like to review an example of a full file output, please .

https://www.python.org/downloads/
https://kubernetes.io/docs/tasks/tools/
this public repository
Contact US
Click to enlarge