netstat
-
kubectl 컨테이너 netstat 정보알기카테고리 없음 2019. 1. 9. 17:50
#!/bin/bashkubectl get pods -o wide |awk '{ print $1 }' | grep -w "단어" | head -n 55 > w.outkubectl get pods -o wide |awk '{ print $1 }' | grep -w "단어" | head -n 55 | wc -lcDate=`date '+%Y-%m-%d %T'`echo "$cDate"for B in $(cat ./w.out)doecho ${B}kubectl exec -it ${B} -- netstat -tan | grep -i 'SYN_SENT'done