Commit 45310b6 1 parent 0be1d07 commit 45310b6 Copy full SHA for 45310b6
File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+ set -euox pipefail
3
+
4
+ output_folder=" /tmp/$( basename " $0 " ) )"
5
+ target_namespaces=(cbci cbci-agents)
6
+ mkdir " $output_folder " || echo " $output_folder already exists"
7
+ kubectl describe nodes --show-events=true > " $output_folder /nodes.txt"
8
+ kubectl cluster-info dump > " $output_folder /cluster.json"
9
+ for n in " ${target_namespaces[@]} "
10
+ do
11
+ kubectl get ns " $n " || (echo " Namespace $n does not exist" && exit 1)
12
+ kubectl get all -n " $n " -o wide > " $output_folder /get-all-$n .yaml"
13
+ kubectl describe pod -n " $n " --show-events=true > " $output_folder /describe-pods-$n .yaml"
14
+ done
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/bash
2
+ set -euox pipefail
3
+
4
+ namespace_name=" namespace-example"
5
+ pod_name=" jenkins-example-0"
6
+ watch -n1 " echo 'NODES\n'; kubectl top nodes; echo '\n\n' ; \
7
+ echo 'PODS\n'; kubectl -n ${namespace_name} top pods; echo '\n\n'; \
8
+ echo 'CONTAINERS\n'; kubectl -n ${namespace_name} top pod ${pod_name} --containers"
You can’t perform that action at this time.
0 commit comments