# Kubectl is killed in lens desktop terminal, cannot exec to pods

**URL:** https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554
**Category:** Lens Support & Troubleshooting
**Tags:** lens-terminal, lens-desktop, kubectl
**Created:** [June 13, 2023, 7:16am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554 "2023-06-13T07:16:43Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![peanutnbt](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/c6cbf5/32.png) [@peanutnbt](https://forums.k8slens.dev/u/peanutnbt)
#### Post date: [June 13, 2023, 7:16am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/1 "2023-06-13T07:16:43Z")

</div>

I have a problem after updating the lens desktop to version 2023.5.310801-latest a day before, the problem is I cannot exec to any pod using the shell feature. After that, I tried to use kubectl commands in lens terminal, but all of them are killed after I press enter. Note that, I can use kubectl commands in my macOS terminal, but they aren’t work in lens app terminal. Can anyone give me a hint, thank you!

![image](https://discuss-k8slens-dev.s3.dualstack.eu-west-1.amazonaws.com/original/1X/3707d2ca2c0904b171b46abf05e83dcad4a89e2e.png)

---

<div class="post-metadata">

### Author: ![gaccettola](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/g/779978/32.png) [@gaccettola](https://forums.k8slens.dev/u/gaccettola)
#### Post date: [June 13, 2023, 11:23am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/2 "2023-06-13T11:23:32Z")

</div>

Hey there,

I would like to confirm just a few things while we are looking into this on our side.

- Are you able to still connect to you pods from kubectl running outside of lens
- Where are the pods running ( docker, minikube, AWS, GCP, EKS, … )
- What version of kubernetes are you connecting to?

Kindly,  
The Lens Core Team

---

<div class="post-metadata">

### Author: ![peanutnbt](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/c6cbf5/32.png) [@peanutnbt](https://forums.k8slens.dev/u/peanutnbt)
#### Post date: [June 13, 2023, 11:47am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/3 "2023-06-13T11:47:44Z")

</div>

Thank you for your response!

- Yeah, I can use kubectl to connect my pods, and other kubectl commands.

- My pods running in EKS and use k8s version 1.24

I also try to restart lens, and my macOS as well, but nothing changed. And the problem seem like occurred after I update lens. I’m not sure what caused the issue, do you have any idea, or should I try to reinstall lens ?

---

<div class="post-metadata">

### Author: ![aleksfront](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@aleksfront](https://forums.k8slens.dev/u/aleksfront)
#### Post date: [June 14, 2023, 5:23am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/4 "2023-06-14T05:23:04Z")

</div>

Does `kubectl` works outside of the shell process but in Lens terminal?

---

<div class="post-metadata">

### Author: ![peanutnbt](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/c6cbf5/32.png) [@peanutnbt](https://forums.k8slens.dev/u/peanutnbt)
#### Post date: [June 14, 2023, 6:23am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/5 "2023-06-14T06:23:42Z")

</div>

yes, it works in macOS terminal, but not in Lens terminal.

---

<div class="post-metadata">

### Author: ![peanutnbt](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/c6cbf5/32.png) [@peanutnbt](https://forums.k8slens.dev/u/peanutnbt)
#### Post date: [June 14, 2023, 6:54am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/6 "2023-06-14T06:54:48Z")

</div>

I get this log form macOS system log:  
ASP: Security policy would not allow process: 13457, /Users/tristan/Library/Application Support/Lens/binaries/kubectl/1.24.14/kubectl

---

<div class="post-metadata">

### Author: ![peanutnbt](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/p/c6cbf5/32.png) [@peanutnbt](https://forums.k8slens.dev/u/peanutnbt)
#### Post date: [June 14, 2023, 7:30am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/7 "2023-06-14T07:30:02Z")

</div>

It works after I change path to kubectl binary to mine, not Lens binary.

---

<div class="post-metadata">

### Author: ![aleksfront](https://forums.k8slens.dev/letter_avatar_proxy/v4/letter/a/e480ec/32.png) [@aleksfront](https://forums.k8slens.dev/u/aleksfront)
#### Post date: [June 14, 2023, 10:13am UTC](https://forums.k8slens.dev/t/kubectl-is-killed-in-lens-desktop-terminal-cannot-exec-to-pods/554/8 "2023-06-14T10:13:57Z")

</div>

Thanks for letting us know!
