Skip to content

Conversation

chrismld
Copy link

Summary

This PR transforms the EKS aperf script into a kubectl plugin and adds several enhancements to improve usability and automation.

Changes

1. Kubectl Plugin Support

  • Renamed eks-aperf.shkubectl-aperf to follow kubectl plugin naming conventions
  • Users can now install and run as: kubectl aperf [options]
  • Added installation instructions to README-EKS.md

2. Enhanced Script Features

Automatic Taint Handling

  • Automatically detects node taints using kubectl get node and jq
  • Dynamically generates tolerations in the pod spec
  • Enables aperf to run on tainted nodes without manual configuration

Configurable Report Names

  • Added --report-name parameter (default: aperf_record)
  • Allows users to specify custom names for better organization
  • Example: --report-name="loadtest_run1"

Automatic Report Extraction and Browser Opening

  • Automatically extracts the tar.gz report after collection
  • Opens index.html in the default browser (configurable via --open-browser)
  • Cross-platform support for macOS (open) and Linux (xdg-open)
  • Default behavior: --open-browser=true

Improved Error Handling

  • Added graceful handling for missing metrics-server
  • Shows helpful messages when kubectl top is unavailable
  • Better error messages with debug output

3. Documentation Updates

  • Updated all script references from eks-aperf.sh to kubectl-aperf
  • Added kubectl plugin installation section
  • Added Krew plugin manager documentation (for future distribution)
  • Updated usage examples throughout README-EKS.md

New Parameters

Parameter Type Default Description
--report-name string aperf_record Custom name for aperf record/report
--open-browser boolean true Automatically open report in browser

Testing

Tested on:

✅ macOS (Darwin) with tainted EKS nodes
✅ Automatic browser opening on macOS
✅ Custom report names
✅ Nodes with multiple taints

Breaking Changes

None. The script maintains backward compatibility with all existing parameters.

Future Work

  • Submit to official Krew index for wider distribution
  • Add support for multiple nodes in a single run
  • Add report comparison features

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@chrismld chrismld requested a review from a team as a code owner October 15, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant