From dac6b34a618cd7790e0a177a622d6c0d5e8df766 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Wed, 15 Jan 2025 17:57:14 +0200 Subject: [PATCH] kubeadm: improve message in 'reset' Link to the k8s.io website page for 'kubeadm reset', which should have the instructions on how to perform manuall cleanups. --- cmd/kubeadm/app/cmd/reset.go | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/cmd/kubeadm/app/cmd/reset.go b/cmd/kubeadm/app/cmd/reset.go index 5fdc7ec193f..03e9b0cb354 100644 --- a/cmd/kubeadm/app/cmd/reset.go +++ b/cmd/kubeadm/app/cmd/reset.go @@ -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 `) ) @@ -234,10 +228,7 @@ 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 - fmt.Print(iptablesCleanupInstructions) + fmt.Print(manualCleanupInstructions) return nil }, }