Skip to content

Commit e0f3811

Browse files
Removed leading slash for the kubectl command in exec.
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"}
1 parent a12fc00 commit e0f3811

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drainmanager/kubernetes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func (m *DrainManagerKubernetes) exec(args ...string) bool {
7575
args = append(args, "--dry-run")
7676
}
7777

78-
return m.runComand(exec.Command("/kubectl", args...))
78+
return m.runComand(exec.Command("kubectl", args...))
7979
}
8080

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

0 commit comments

Comments
 (0)