Skip to content

Commit

Permalink
Removed leading slash for the kubectl command in exec.
Browse files Browse the repository at this point in the history
Resolving error in Kubernetes deployment version.

{"level":"error","msg":"fork/exec /kubectl: no such file or directory","command":"kubectl"}
2024-09-25T15:53:42.984930129Z {"level":"info","caller":"manager/manager.go:277","msg":"drained failed","eventID":"267C5600-FEE5-406C-A8B8-58833494F238"}
  • Loading branch information
bschamplin-stryker authored Sep 25, 2024
1 parent a12fc00 commit e0f3811
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drainmanager/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (m *DrainManagerKubernetes) exec(args ...string) bool {
args = append(args, "--dry-run")
}

return m.runComand(exec.Command("/kubectl", args...))
return m.runComand(exec.Command("kubectl", args...))
}

func (m *DrainManagerKubernetes) runComand(cmd *exec.Cmd) bool {
Expand Down

0 comments on commit e0f3811

Please sign in to comment.