Activating Network Agents
Network Agents can be activated either on demand or automatically in several ways:
- Using Agent templates
- Using the
kubeshark scripts
command - Via the Kubeshark Dashboard
Activating Agents Using Agent Templates
Kubeshark provides fully functional Agent templates. These can be used as-is to fulfill automation tasks, customized, or used as inspiration to create new agents.
Activating an Agent Template Automatically
To automatically run one or more Agent templates, add the agent name(s) to the scripting.active
Helm value.
For example, to activate the Redact Sensitive Data
agent each time Kubeshark starts:
scripting:
active:
- Redact Sensitive Data
Activating Agents Automatically
To run agents by default, add their names to the scripting.active
value.
For example, if the agent’s script begins with:
// script 1
Then add the following to your configuration:
scripting:
active:
- script 1
Running from the UI
You can also run agents directly from the Kubeshark UI. Note: Scripts created in the UI are not persistent and will be lost when Kubeshark restarts.
To run a script:
- Start a new script in the UI.
- Paste the agent’s script code.
- Activate the agent.