Skip to content

Commit

Permalink
fix remove node check
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangzhiqiangcs committed Dec 17, 2022
1 parent f34bf69 commit 2d7bb0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/kk/pkg/kubernetes/tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ type FindNode struct {
func (f *FindNode) Execute(runtime connector.Runtime) error {
var resArr []string
res, err := runtime.GetRunner().Cmd(
"sudo -E /usr/local/bin/kubectl get nodes | grep -v NAME | grep -v 'master\\|control-plane' | awk '{print $1}'",
"sudo -E /usr/local/bin/kubectl get nodes | awk '$3 !~ /master|control-plane|ROLES/ {print $1}'",
true)
if err != nil {
return errors.Wrap(errors.WithStack(err), "kubectl get nodes failed")
Expand Down

0 comments on commit 2d7bb0c

Please sign in to comment.