How to collect Control Plane component logs for an RKE cluster when logging based on determined or selected namespaces
This document (000020959) is provided subject to the disclaimer at the end of this document.
Situation
Resolution
Below is an example of a cluster flow collecting logs based on a list of selected namespaces, which will not, without the container_names directive, collect the control plane components.
For this example, we have a cluster output cattle-logging-cluster-test-output forwarding logs to an endpoint of our choice, and you will have to do the same to see the logs in your logging infrastructure.
Note: Below is not an exhaustive list of all the RKE control plane containers and system namespaces, but the most common ones.
apiVersion: logging.banzaicloud.io/v1beta1 kind: ClusterFlow metadata: name: cattle-logging-cluster-test-flow namespace: cattle-logging spec: filters: match: - select: namespaces: - kube-janitor - kube-node-lease - kube-public - kube-system - calico-system - cattle-fleet-system - cattle-impersonation-system - cattle-system - cattle-logging - default - opa container_names: - kube-apiserver - etcd - kubelet globalOutputRefs: - cattle-logging-cluster-test-output
Cause
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020959
- Creation Date: 06-Feb-2023
- Modified Date:06-Feb-2023
-
- SUSE Rancher
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com