Skip to content

Instantly share code, notes, and snippets.

View czm41k's full-sized avatar

Evgeny Tselikov czm41k

  • Express42
  • Moscow
View GitHub Profile
@mnadel
mnadel / kcdo
Last active February 14, 2023 07:36
Exec Across (Some, All) Pods in Kubernetes
#!/usr/bin/env bash
PROGNAME=$(basename $0)
function usage {
echo "usage: $PROGNAME [-n NAMESPACE] [-m MAX-PODS] -s SERVICE -- COMMAND"
echo " -s SERVICE K8s service, i.e. a pod selector (required)"
echo " COMMAND Command to execute on the pods"
echo " -n NAMESPACE K8s namespace (optional)"
echo " -m MAX-PODS Max number of pods to run on (optional; default=all)"