Skip to content

Add --skip-logs and --skip-events flags to kubectl cluster-info dump #1866

Description

@rjbrown57

What would you like to be added?

Add two flags to kubectl cluster-info dump:

  • --skip-logs: Do not retrieve pod logs.
  • --skip-events: Do not retrieve Events.

Both flags would default to false, preserving existing behavior.

Examples:

kubectl cluster-info dump --skip-logs
kubectl cluster-info dump --skip-events
kubectl cluster-info dump --skip-logs --skip-events

Why is this needed?

kubectl cluster-info dump currently always retrieves events and logs for every
selected namespace. In some environments this:

  • makes the dump substantially slower and larger.
  • collects potentially sensitive application log data unnecessarily.
  • prevents callers from creating a resource-state-only diagnostic bundle.

Proposed behavior

  • Existing behavior remains unchanged when neither flag is supplied.
  • --skip-logs avoids all pod log API requests and does not create log files.
  • --skip-events avoids all Event list requests and does not create event files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions