Skip to content

CLI: Cluster Lifecycle Management #4531

@weyfonk

Description

@weyfonk

As a Platform Administrator, I want to easily register a new Kubernetes cluster with Fleet and remove an existing one using CLI commands, so that I can automate the provisioning and de-provisioning of cluster resources, integrate it into CI/CD pipelines, and manage my fleet's scale efficiently without manual intervention in a UI.

Acceptance Criteria:

  • A fleet cluster register <cluster-name> --kubeconfig <path-to-kubeconfig> [--labels key=value,...] command exists.

    • It registers the cluster with the Fleet control plane, applying any specified labels.
      • Should this wait for the operation to complete?
    • The command should be idempotent (re-running on an already registered cluster with the same parameters should result in no change or a successful state).
  • A fleet cluster remove <cluster-name> [--force] command exists.

    • The command gracefully uninstalls the Fleet agent from the target cluster.
    • It unregisters the cluster from the Fleet control plane.
      • Should this wait for the operation to complete?
    • The --force option allows removal even if the agent is unresponsive.
  • fleet cluster list shows registered clusters and their agent connection status.
    (if it is an improvement over kubectl list clusters)

(Originally created from #3771)

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    🆕 New

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions