kubectl cpu-pin: CPU Pinning, NUMA & CFS Throttling Inspector
Verify Kubelet cpuManagerPolicy: static, single-numa-node TopologyManager alignment, 1Gi HugePages, and real-time cAdvisor CFS CPU throttling without Prometheus.
Core Capabilities
- Live Kubelet Policy Audit (
/proxy/configz): VerifiescpuManagerPolicy,full-pcpus-only,topologyManagerPolicy, andreservedSystemCPUson every node. - Pinned vs Shared Pool Linter: Flags latency-sensitive Pods silently pushed into the shared CFS pool due to
BurstableQoS or fractional millicore CPU limits (e.g.2500m). - Live CFS CPU Throttling (No Prometheus Required): Scrapes
container_cpu_cfs_throttled_periods_totaldirectly from Kubelet cAdvisor metrics.
Quick Start
git clone https://github.com/kubectl-ltd/kubectl-cpu-pin.git
cd kubectl-cpu-pin
go build -o kubectl-cpu_pin ./cmd/kubectl-cpu_pin
sudo mv kubectl-cpu_pin /usr/local/bin/
kubectl cpu-pin
kubectl cpu-pin -n trading --throttle-threshold 3.0
kubectl cpu-pin --demo