Created
August 27, 2019 06:59
-
-
Save garethr/fd27da6da7290bf813838256369e8e66 to your computer and use it in GitHub Desktop.
Looking at usage of kubectl commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a commands=( | |
create | |
expose | |
run | |
set | |
explain | |
get | |
edit | |
delete | |
rollout | |
scale | |
autoscale | |
certificate | |
cluster-info | |
top | |
cordon | |
uncordon | |
drain | |
taint | |
describe | |
logs | |
attach | |
exec | |
port-forward | |
proxy | |
cp | |
auth | |
diff | |
apply | |
patch | |
replace | |
wait | |
convert | |
kustomize | |
label | |
annotate | |
completion | |
api-resources | |
api-versions | |
config | |
plugin | |
version | |
) | |
for command in "${commands[@]}" | |
do | |
count=$(curl --silent -H "Authorization: token $GITHUB_TOKEN" "https://api.github.com/search/code?q=\"kubectl+${command}\"" | jq .total_count) | |
echo "kubectl ${command} - ${count}" | |
sleep 10 | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl get - 187816 | |
kubectl create - 142078 | |
kubectl apply - 99388 | |
kubectl delete - 81979 | |
kubectl describe - 44177 | |
kubectl port-forward - 44044 | |
kubectl exec - 43162 | |
kubectl run - 39559 | |
kubectl config - 38550 | |
kubectl logs - 34607 | |
kubectl version - 23894 | |
kubectl proxy - 19584 | |
kubectl scale - 19388 | |
kubectl patch - 17638 | |
kubectl expose - 16759 | |
kubectl cluster-info - 15470 | |
kubectl label - 15023 | |
kubectl edit - 13616 | |
kubectl rollout - 13228 | |
kubectl set - 12010 | |
kubectl annotate - 9183 | |
kubectl replace - 8402 | |
kubectl completion - 8286 | |
kubectl taint - 6875 | |
kubectl drain - 6534 | |
kubectl cp - 6232 | |
kubectl top - 5379 | |
kubectl api-versions - 5227 | |
kubectl autoscale - 4343 | |
kubectl attach - 4320 | |
kubectl uncordon - 4111 | |
kubectl explain - 3661 | |
kubectl certificate - 3060 | |
kubectl cordon - 2998 | |
kubectl convert - 2329 | |
kubectl auth - 2136 | |
kubectl plugin - 1958 | |
kubectl wait - 1418 | |
kubectl api-resources - 1068 | |
kubectl diff - 994 | |
kubectl kustomize - 267 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment