From b31b1db1518d64c71b3e9f8e770bd0079c054635 Mon Sep 17 00:00:00 2001 From: Jessi Manthei Date: Fri, 2 May 2025 14:36:34 -0500 Subject: [PATCH] OCPBUGS-29275 for a fourth try --- modules/nw-dns-viewlog.adoc | 25 +++++++++++++++++++++++++ networking/dns-operator.adoc | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 modules/nw-dns-viewlog.adoc diff --git a/modules/nw-dns-viewlog.adoc b/modules/nw-dns-viewlog.adoc new file mode 100644 index 0000000000..d9e06d00aa --- /dev/null +++ b/modules/nw-dns-viewlog.adoc @@ -0,0 +1,25 @@ +// Module included in the following assemblies: +// * networking/dns-operator.adoc + +:_mod-docs-content-type: PROCEDURE +[id="nw-dns-viewlog_{context}"] += Viewing the CoreDNS logs + +You can view CoreDNS logs by using the `oc logs` command. + +.Procedure + +* View the logs of a specific CoreDNS pod by entering the following command: ++ +[source,terminal] +---- +$ oc -n openshift-dns logs -c dns +---- + +* Follow the logs of all CoreDNS pods by entering the following command: ++ +[source,terminal] +---- +$ oc -n openshift-dns logs -c dns -l dns.operator.openshift.io/daemonset-dns=default -f --max-log-requests= <1> +---- +<1> Specifies the number of DNS pods to stream logs from. The maximum is 6. diff --git a/networking/dns-operator.adoc b/networking/dns-operator.adoc index 563371bc82..514af1e5e9 100644 --- a/networking/dns-operator.adoc +++ b/networking/dns-operator.adoc @@ -29,6 +29,8 @@ include::modules/nw-dns-operator-logs.adoc[leveloffset=+1] include::modules/nw-dns-loglevel.adoc[leveloffset=+1] +include::modules/nw-dns-viewlog.adoc[leveloffset=+1] + include::modules/nw-dns-operatorloglevel.adoc[leveloffset=+1] include::modules/nw-dns-cache-tuning.adoc[leveloffset=+1]