Kubectl Set Namespace Free 【2025-2027】

And you see the default namespace. You sigh, hit the up arrow, and append -n staging .

Before running any destructive command ( delete , apply ), get in the habit of using --dry-run=client -o yaml . This shows you what the command would do without actually doing it. kubectl set namespace

For example, your prompt might look like this: And you see the default namespace