From bdee4d62f4312fe126d70a67992aa6725df358df Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Sep 2023 13:59:50 +0100 Subject: [PATCH] Collect /etc/resolv.conf inside a pod This should help see what nameservers are used to resolve DNS queries inside a cluster --- host/default.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/host/default.yaml b/host/default.yaml index bdcbd8f..aa3fd6e 100644 --- a/host/default.yaml +++ b/host/default.yaml @@ -388,6 +388,14 @@ spec: collectorName: "localhost-ips" command: "sh" args: ["-c", "host localhost"] + - runPod: + name: resolv.conf + podSpec: + containers: + - name: resolv-conf + image: alpine + command: ["sh", "-c", "cat /etc/resolv.conf"] + restartPolicy: Never hostAnalyzers: - certificate: collectorName: k8s-api-keypair