Skip to content

feat: add delete nodes command #2565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 14, 2025
Merged

Conversation

redscholar
Copy link
Collaborator

What type of PR is this?

/kind feature

What this PR does / why we need it:

add kk delete nodes command:

Delete a cluster nodes

Usage:
  kk delete nodes {node1 node2 ...} [flags]

Aliases:
  nodes, node

Flags:
  -a, --artifact string            Path to a KubeKey artifact
  -c, --config string              the config file path. support *.yaml 
      --container-manager string   Container runtime: docker, containerd. default is docker (default "docker")
  -d, --debug                      Debug mode, after a successful execution of Playbook, will retain runtime data, which includes task execution status and parameters.
  -h, --help                       help for nodes
  -i, --inventory string           the host list file path. support *.yaml
  -n, --namespace string           the namespace which playbook will be executed, all reference resources(playbook, config, inventory, task) should in the same namespace (default "default")
      --set stringArray            set value in config. format --set key=val or --set k1=v1,k2=v2
      --with-kubernetes string     Specify a supported version of kubernetes. default is v1.23.15 (default "v1.23.15")
      --workdir string             the base Dir for kubekey. Default current dir.  (default "/root/kubekey")

test results

  1. delete nodes failed: must at least one control_plane node
    image
  2. delete nodes successfully
    image
    image

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?

add delete nodes command

Additional documentation, usage docs, etc.:


@kubesphere-prow kubesphere-prow bot added release-note kind/feature Categorizes issue or PR as related to a new feature. labels May 14, 2025
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: redscholar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubesphere-prow kubesphere-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels May 14, 2025
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
5.8% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@pixiake pixiake merged commit e97e538 into kubesphere:feature-gitops May 14, 2025
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. release-note size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants