How to Save Current State of Cluster Using Cluster-info Dump Command.

Problem

A "cluster dump" typically refers to a process or action of collecting comprehensive diagnostic information and logs from a Kubernetes cluster. This is done to troubleshoot issues, investigate problems, or provide detailed information to the support team for debugging purposes. Cluster dumps are useful for understanding the state of a cluster and diagnosing problems that may arise during cluster operations.

Here are some common use cases and information that may be included in a cluster dump:

  1. Logging: Cluster dumps often include logs from various components of the Kubernetes cluster, such as control plane components (API server, etcd), worker nodes, and other add-ons (e.g., kube-proxy, kube-dns). These logs can help identify errors, warnings, and other relevant information.
  2. Resource Information: Information about cluster resources, including nodes, pods, services, and configurations, may be included in a cluster dump. This can provide insights into the current state of the cluster and resource allocation.
  3. Configuration: The cluster dump may contain configuration files and settings for various Kubernetes components. This can help identify any discrepancies or misconfigurations that could be causing issues.
  4. Cluster Metrics: Cluster dumps may include metrics and statistics about cluster performance and resource usage. This information can be valuable for performance analysis and optimization.
  5. Network Information: Details about networking configurations, routes, and network policies may be included. Network-related issues can often be diagnosed with this information.
  6. Event Logs: Kubernetes events and audit logs may be part of the cluster dump. These logs can provide a historical record of cluster activity and events.
  7. Cluster State: Information about the current state of objects in the cluster, such as pod statuses, node conditions, and API server status, can help diagnose problems and understand the overall health of the cluster.

Environment

  • Platform9 Managed Kubernetes - v-5.4 and Higher

Procedure

Th below command will save the information from all namespaces including customer's namespaces]:

Cluster dump command
Copy

If there are sensitive/confidential applications running in the cluster it is recommended to avoid using "-A" in the above command which will take dump from all the namespaces including the application namespaces.

It is recommended to take clusterdump from the namespace which is having the issue. For that replace "-A" with "-n <affected_namespace>" in the above command.

The contents created as part of the cluster dump will be:

Contents
Copy
Size of folder
Copy

Additional Information

For reference:

  1. Troubleshooting a cluster.
  2. Kubernetes documentation.
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard