#!/bin/bash if [ -z "$1" ] then echo "Passe o municipio e estado, separado por traço: saojoaobatista-ma" exit 1 fi municipio="$1" pod=$(rancher kubectl get pods -n "$1" | grep -io -- "^.*-plone-[0-9a-z-]*") echo "Entrando no pod $pod" echo "" rancher kubectl exec -n "$municipio" -it "$pod" -- /bin/bash