Search code examples
pythongoogle-cloud-platformgoogle-kubernetes-enginetraceroute

how to install/run traceroute in gke gcp (apt not found)


We have google cloud composer with gke and trying to run trace route

Error : sudo: traceroute: command not found
-bash: traceroute: command not found

Through VM instances we have launched the SSH terminal and then tried traceroute commands and traceroute package is not available.

Is there any way to install traceroute and then run the commands ?

We tried with apt /sudo apt-get but no use getting

 error : apt not found

Verified /etc/resolv.conf as well and below is the content

nameserver 100.200.300.400 search us-north2-a.c.projectopen.internal c.projectopen.internal google.internal


Solution

  • You can use SSH into a GKE node and then run sudo toolbox then inside the toolbox container you can install other tools such as traceroute.

    You can view more details about toolbox here: https://cloud.google.com/container-optimized-os/docs/how-to/toolbox