containers

CrowdStrike FalconPy CrowdStrike FalconPy CrowdStrike Subreddit

Container examples

The examples in this folder focus on leveraging CrowdStrike's Container APIs to discover and manage your container assets.

Discover your Kubernetes Attack Surface

Discovers Kubernetes assets that are monitored by the Falcon Sensor (clusters, nodes, pods, and containers).

[!IMPORTANT] Installing the Kubernetes Protection Agent (KPA) on your clusters will result in the most accurate information.

Running the program

In order to run this demonstration, you will need access to CrowdStrike API keys with the following scopes:

Service Collection
Scope

Kubernetes Protection

READ

Execution syntax

This example accepts the following input parameters.

Parameter
Purpose

-d, --debug

Enable API debugging.

-c, --cluster

Display all clusters and the number of attached nodes.

-n, --node

Display all nodes including the number of attached, active pods.

-nn, --node_name

Displays pods connected to a specific node.

-t, --thread

Enables asynchronous API calls for faster returns.

-k, --key

Your CrowdStrike Falcon API Client ID

-s, --secret

Your CrowdStrike Falcon API Client Secret

Displays the number of clusters, nodes, pods, and containers detected by the Falcon Sensor.

Displays a table of cluster information.

Displays a table of node information.

Displays a table of pods based on it's parent node name using the optional threading feature.

Displays API debug logging.

Command-line help

Command-line help is available using the -h or --help parameters.

Example source code

The source code for this example can be found here.

Last updated

Was this helpful?