Skip to content

Commit dac6b34

Browse files
committed
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.
1 parent ec2e0de commit dac6b34

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

cmd/kubeadm/app/cmd/reset.go

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,13 @@ import (
4747
)
4848

4949
var (
50-
iptablesCleanupInstructions = dedent.Dedent(`
51-
The reset process does not reset or clean up iptables rules or IPVS tables.
52-
If you wish to reset iptables, you must do so manually by using the "iptables" command.
50+
manualCleanupInstructions = dedent.Dedent(`
51+
The reset process does not perform cleanup of CNI plugin configuration,
52+
network filtering rules and kubeconfig files.
5353
54-
If your cluster was setup to utilize IPVS, run ipvsadm --clear (or similar)
55-
to reset your system's IPVS tables.
54+
For information on how to perform this cleanup manually, please see:
55+
https://k8s.io/docs/reference/setup-tools/kubeadm/kubeadm-reset/
5656
57-
The reset process does not clean your kubeconfig files and you must remove them manually.
58-
Please, check the contents of the $HOME/.kube/config file.
59-
`)
60-
61-
cniCleanupInstructions = dedent.Dedent(`
62-
The reset process does not clean CNI configuration. To do so, you must remove /etc/cni/net.d
6357
`)
6458
)
6559

@@ -234,10 +228,7 @@ func newCmdReset(in io.Reader, out io.Writer, resetOptions *resetOptions) *cobra
234228
return err
235229
}
236230

237-
// output help text instructing user how to remove cni folders
238-
fmt.Print(cniCleanupInstructions)
239-
// Output help text instructing user how to remove iptables rules
240-
fmt.Print(iptablesCleanupInstructions)
231+
fmt.Print(manualCleanupInstructions)
241232
return nil
242233
},
243234
}

0 commit comments

Comments
 (0)