Skip to content

Instantly share code, notes, and snippets.

@jsturtevant
Last active August 6, 2024 21:08
Show Gist options
  • Save jsturtevant/9a996d55038c2bffcd83bbe3871d58bb to your computer and use it in GitHub Desktop.
Save jsturtevant/9a996d55038c2bffcd83bbe3871d58bb to your computer and use it in GitHub Desktop.
impossible
Perf
| extend cluster = tostring(split(InstanceName, "/")[-3])
| where CounterName == "cpuUsageNanoCores"
| where cluster == "test-aks-27081-cluster"
| where Computer == "aks-nodepool1-12536813-vmss000000"
| summarize avg_cpu=avg(CounterValue/10000000), max_cpu=max(CounterValue/1000000000) by bin(TimeGenerated, 15m), InstanceName, Computer
| order by max_cpu asc
kubectl get --raw "/api/v1/nodes/aks-nodepool1-12536813-vmss000000/proxy/stats/summary" | jq '.pods[] | select(.podRef.name | startswith("cpuburner")).cpu'
apiVersion: apps/v1
kind: Deployment
metadata:
name: cpuburner
spec:
replicas: 2400
revisionHistoryLimit: 3
selector:
matchLabels:
app: cpuburner
template:
metadata:
labels:
app: cpuburner
spec:
containers:
- image: alexeiled/stress-ng:0.11.01
args: ["--cpu", "0", "--cpu-method", "matrixprod", "--timeout", "240s"]
name: cpuburner
securityContext:
allowPrivilegeEscalation: false
securityContext:
runAsUser: 2000
@jsturtevant
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment