From 03b97fa46349ac9a6923c6c7217e985eb9975f93 Mon Sep 17 00:00:00 2001 From: patrickhargett Date: Wed, 15 Mar 2023 10:11:29 -0400 Subject: [PATCH 1/2] [get_support_bundle.sh] Add kubectl version Adding kubectl version output to the support bundle script --- support_bundle/get_support_bundle.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/support_bundle/get_support_bundle.sh b/support_bundle/get_support_bundle.sh index ba6d56fc..2a73b702 100755 --- a/support_bundle/get_support_bundle.sh +++ b/support_bundle/get_support_bundle.sh @@ -195,6 +195,9 @@ main() { echo "Using namespace ${NAMESPACE}" echo "Using context ${CONTEXT}" + # Collect kubectl version + kubectl version > ${LOG_DIR}/kubectl_version.txt + # Collect container logs for each pod if [[ "${SKIP_LOGS}" == "false" ]]; then echo "Gathering Logs from ${NAMESPACE} pods" From 12841ba01a481fbbf9f7ba0652260e30596009fa Mon Sep 17 00:00:00 2001 From: patrickhargett Date: Fri, 7 Jul 2023 11:21:53 -0400 Subject: [PATCH 2/2] Update get_support_bundle.sh Adding context to the kubectl version command. --- support_bundle/get_support_bundle.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support_bundle/get_support_bundle.sh b/support_bundle/get_support_bundle.sh index 2a73b702..3b510aae 100755 --- a/support_bundle/get_support_bundle.sh +++ b/support_bundle/get_support_bundle.sh @@ -196,7 +196,7 @@ main() { echo "Using context ${CONTEXT}" # Collect kubectl version - kubectl version > ${LOG_DIR}/kubectl_version.txt + kubectl ${CONTEXT} version > ${LOG_DIR}/kubectl_version.txt # Collect container logs for each pod if [[ "${SKIP_LOGS}" == "false" ]]; then