# Run executable from hosting machine in a container

**URL:** <https://discuss.kubernetes.io/t/run-executable-from-hosting-machine-in-a-container/18946>\
**Category:** General Discussions\
**Created:** [February 1, 2022, 11:11am UTC](https://discuss.kubernetes.io/t/run-executable-from-hosting-machine-in-a-container/18946 "2022-02-01T11:11:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreyer](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/dreyer/32/9441_2.png) [@dreyer](https://discuss.kubernetes.io/u/dreyer)\
**Post date:** [February 1, 2022, 11:11am UTC](https://discuss.kubernetes.io/t/run-executable-from-hosting-machine-in-a-container/18946/1 "2022-02-01T11:11:12Z")

</div>

Hi all, how can I run a command from the machine host, inside the container/pod?  
For example the hosting machine has `curl` and the container doesn’t.  
So I want to execute the curl inside the container, using the existing curl from the hosting machine.

Thank you.

---

<div class="post-metadata">

**Author:** ![ga2022](https://avatars.discourse-cdn.com/v4/letter/g/6f9a4e/32.png) [@ga2022](https://discuss.kubernetes.io/u/ga2022)\
**Post date:** [February 1, 2022, 4:13pm UTC](https://discuss.kubernetes.io/t/run-executable-from-hosting-machine-in-a-container/18946/2 "2022-02-01T16:13:07Z")

</div>

What’s the are you trying to solve with this request? You can’t run curl inside the container unless the curl utility is already installed inside the container. What’s preventing you from installing curl inside the container?

---

<div class="post-metadata">

**Author:** ![dreyer](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/dreyer/32/9441_2.png) [@dreyer](https://discuss.kubernetes.io/u/dreyer)\
**Post date:** [February 2, 2022, 10:51am UTC](https://discuss.kubernetes.io/t/run-executable-from-hosting-machine-in-a-container/18946/3 "2022-02-02T10:51:09Z")

</div>

Some of my customers have no internet connection on their environment.  
But thanks, I found a way to run it with nsenter command.
