Skip to content

Kubectl not working on linux #854

Description

@salimbouch

Kubectl doesnt work on Linux (tested on Ubuntu 24.04.1 LTS)

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. execute ide kubectl

Comments/Hints:

ide kubectl
We need to run the following privileged command(s):
curl -s https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb/Release.key | gpg --dearmor | sudo dd status=none of=/usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg
echo 'deb [signed-by=/usr/share/keyrings/isv-rancher-stable-archive-keyring.gpg] https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb/ ./' | sudo dd status=none of=/etc/apt/sources.list.d/isv-rancher-stable.list
sudo apt update
sudo apt install -y --allow-downgrades rancher-desktop=1.16.0*
This will require root permissions!
Hit:1 https://download.opensuse.org/repositories/isv:/Rancher:/stable/deb ./ InRelease
Hit:2 http://security.ubuntu.com/ubuntu noble-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu noble InRelease
Hit:4 http://archive.ubuntu.com/ubuntu noble-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
56 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
rancher-desktop is already the newest version (1.16.0-2.1).
Selected version '1.16.0-2.1' (isv:Rancher:stable:download.opensuse.org [amd64]) for 'rancher-desktop'
0 upgraded, 0 newly installed, 0 to remove and 56 not upgraded.
An unexpected error occurred!
We are sorry for the inconvenience.
Please check the error below, resolve it and try again.
If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:
https://github.com/devonfw/IDEasy/issues/new?assignees=&labels=bug&projects=&template=bug.md&title=IllegalStateException%3A+Running+command+%27kubectl%27+failed%3A+Cannot+run+program+%22kubectl%22%3A+error%3D2%2C+No+such+file+or+directory
java.lang.IllegalStateException: Running command 'kubectl' failed: Cannot run program "kubectl": error=2, No such file or directory
        at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:210)
        at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:169)
        at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:152)
        at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:139)
        at com.devonfw.tools.ide.tool.ToolCommandlet.run(ToolCommandlet.java:130)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:867)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:798)
        at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:89)
        at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:52)
        at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:29)
        at java.base@21.0.2/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.io.IOException: Cannot run program "kubectl": error=2, No such file or directory
        at java.base@21.0.2/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
        at java.base@21.0.2/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
        at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:174)
        ... 10 more
Caused by: java.io.IOException: error=2, No such file or directory
        at java.base@21.0.2/java.lang.ProcessImpl.forkAndExec(Native Method)
        at java.base@21.0.2/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
        at java.base@21.0.2/java.lang.ProcessImpl.start(ProcessImpl.java:225)
        at java.base@21.0.2/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
        ... 12 more


Error: IDEasy failed with exit code 255

Metadata

Metadata

Assignees

Labels

kubectlkubernetes command integrationlinuxspecific for linux OS (debian, ubunutu, suse, etc.)

Type

Fields

No fields configured for Bug.

Projects

Status
🏗 In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions