Skip to content
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

kubeadm: improve message in 'reset' #129644

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions cmd/kubeadm/app/cmd/reset.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,13 @@ import (
)

var (
iptablesCleanupInstructions = dedent.Dedent(`
The reset process does not reset or clean up iptables rules or IPVS tables.
If you wish to reset iptables, you must do so manually by using the "iptables" command.
manualCleanupInstructions = dedent.Dedent(`
The reset process does not perform cleanup of CNI plugin configuration,
network filtering rules and kubeconfig files.

If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
to reset your system's IPVS tables.
For information on how to perform this cleanup manually, please see:
https://k8s.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/

The reset process does not clean your kubeconfig files and you must remove them manually.
Please, check the contents of the $HOME/.kube/config file.
`)

cniCleanupInstructions = dedent.Dedent(`
The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d
`)
)

Expand Down Expand Up @@ -234,10 +228,8 @@ func newCmdReset(in io.Reader, out io.Writer, resetOptions *resetOptions) *cobra
return err
}

// output help text instructing user how to remove cni folders
fmt.Print(cniCleanupInstructions)
// Output help text instructing user how to remove iptables rules
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment needs to be updated as well.

fmt.Print(iptablesCleanupInstructions)
fmt.Print(manualCleanupInstructions)
return nil
},
}
Expand Down