Skip to content

Instantly share code, notes, and snippets.

View aramse's full-sized avatar

aramse

View GitHub Profile
function check_thresholds(){
FILE=$1
THRESHOLDS=$2
failed=0
if ! [ -z "$THRESHOLDS" ]; then
IFS=","
for pair in $THRESHOLDS; do
echo "checking if $pair ..."
echo $pair | grep "<" > /dev/null && use_lt=1 || use_lt=0
@aramse
aramse / gist:6eb4a5b11269bb19d9ad35bb21ace6f6
Last active February 8, 2023 07:12
Useful kubectl commands
# Run a container with the AWS CLI on a specific node:
kubectl run -it debug --image amazon/aws-cli --command bash --overrides='{ "apiVersion": "apps/v1beta1", "spec": { "template": { "spec": { "nodeSelector": { "kubernetes.io/hostname": "<node-name>" } } } } }'
# Configure KIAM role:
kubectl run -it debug --image amazon/aws-cli --overrides='{"spec": {"template": {"metadata": {"annotations": {"iam.amazonaws.com/role": "my-cool-role"}}}}}' -- bash