Skip to content

Instantly share code, notes, and snippets.

@shiveshabhishek
Last active December 29, 2019 06:48
Show Gist options
  • Save shiveshabhishek/4a06f976ed5ccf877cf947f2ea3af3db to your computer and use it in GitHub Desktop.
Save shiveshabhishek/4a06f976ed5ccf877cf947f2ea3af3db to your computer and use it in GitHub Desktop.
Kubernetes Useful Commands
1. Set-up desired namespace as default if you want to work with it for longer period :

Edit your bashrc and add this lines:

  i. vi ~/.bashrc
 ii. Paste this and save:
     alias ns='kubectl config set-context $(kubectl config current-context) --namespace' 
iii. Restart terminal and use:
     ns YOURNAMESPACE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment