현재 클러스터와 운영 호스트의 실측 상태를 표준 명령 세트로 수집한다. infra_state 갱신이나 운영 점검 전에 사용한다.
kubectl, kubectl top, ssh station을 기준으로 현재 운영 상태를 빠르게 수집한다.
station 호스트 상태 수집가능하면 아래 스크립트를 우선 사용한다.
infra/scripts/collect/collect-live-state.sh
옵션:
infra/scripts/collect/collect-live-state.sh <namespace>INCLUDE_STATION=0 infra/scripts/collect/collect-live-state.shkubectl get ns
kubectl get nodes -o wide
kubectl top nodes
kubectl get cronjob -A
kubectl get svc -A
kubectl get all -n deep-quest -o wide
kubectl get ingress,hpa,pvc,cronjob -n deep-quest
kubectl top pods -n deep-quest
kubectl get configmap,secret -n deep-quest
kubectl get events -n deep-quest --sort-by=.lastTimestamp | tail -n 50
ssh station 'timedatectl | sed -n "1,8p"'
ssh station 'sed -n "1,120p" /etc/cron.d/station-image-prune'
ssh station 'sed -n "1,220p" /usr/local/sbin/station-image-prune.sh'
ssh station 'tail -n 20 /var/log/station-image-prune.log 2>/dev/null || true'
infra_state/ 갱신이 목적이면 update-infra-state 형식에 맞춘다check-troubleshooting을 먼저 고려한다