Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: correct kubectl command execution by removing absolute path #20

Closed
cuonghm2809 opened this issue Oct 18, 2024 · 2 comments
Closed

Comments

@cuonghm2809
Copy link

cuonghm2809 commented Oct 18, 2024

Issue Description:

The application encountered an error where the kubectl command could not be executed because it was referenced with an absolute path (/kubectl). The error message fork/exec /kubectl: no such file or directory indicates that the command was not found at the specified path. This issue occurs because kubectl should be invoked using its relative or full path based on the environment configuration, rather than assuming a fixed location.

{"level":"info","caller":"drainmanager/kubernetes.go:54","msg":"uncordon node aks-agent-312112314-vmss000000"}
{"level":"error","msg":"fork/exec /kubectl: no such file or directory","command":"kubectl"}

Steps to Reproduce:

Attempt to run the drain function that triggers the kubectl command.
Observe the error message related to /kubectl not being found.
Expected Behavior: The kubectl command should execute successfully, allowing proper drain handling in the Kubernetes environment.

Actual Behavior: The execution fails with the error no such file or directory due to an incorrect path reference for kubectl.

@aslafy-z
Copy link

See #18

@mblaschke
Copy link
Member

merged and fixed with 25.2.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants