79733859

Date: 2025-08-13 04:50:36
Score: 0.5
Natty:
Report link

The issue turned out to be quite strange. On Windows, "kubectl edit" basically runs the command "notepad" in cmd behind the scenes, if some environment variables are not set otherwise: https://kubernetes.io/docs/reference/kubectl/generated/kubectl_edit/

When I tried running "notepad" in cmd, I encountered errors saying, "This program can't run on Windows" and "Access is denied." However, I could still open Notepad through PowerShell or other methods. Running "where notepad" in cmd revealed multiple locations for the executable, with the top one being "C:\Users\myuser\notepad.exe" Upon checking, I found a zero-byte notepad.exe file there, though I have no idea how it got created. Deleting that file resolved the issue, and kubectl started working normally again.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Self-answer (0.5):
Posted by: uylmz