Collection of scripts, opssh is a collection of commands (mostly Linux) for doing ops stuffs
List of listened ports
# Long output
netstat -ap tcp | grep -i "listen"
# Short output
lsof -PiTCP -sTCP:LISTEN
SSH Tunneling
ssh -nNT -L $LOCAL_PORT:$LOCATION_REACHED_FROM_REMOTE:$REMOTE_PORT $USER@$HOST -p $PORT
List of all docker service
docker service ls
Get all environment variable form Docker container
docker exec -it $CONTAINER_ID env
Get Host IP Address from inside Docker container
/sbin/ip route|awk '/default/ { print $3 }'
Force delete helm chart
helm delete $chart-name --purge
Delete all helm chart
helm delete $(helm ls --all | grep -v 'NAME' | awk '{print $1}') --purge
Get ClusterIP of a ClusterIP register helm chart
kubectl get services $helm_chart_name-$helm_service_name | grep ClusterIP | awk '{print $3}'
Debug Helm output
helm install --dry-run --debug $chart_dir --set $a_value_to_override