-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathkubernetes.cheat
More file actions
12 lines (7 loc) · 777 Bytes
/
Copy pathkubernetes.cheat
File metadata and controls
12 lines (7 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
% kubectl cheats
# get node info
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ kubectl ]' -c kubectl get nodes -o wide
# run helm from nix
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ kubernetes-helm ]' -c helm
# disable node spawning on master(s)
nix shell --impure -I nixpkgs=channel:nixos-unstable --expr 'with import (builtins.findFile builtins.nixPath "nixpkgs") { config.allowUnfree = true; }; [ kubectl ]' -c kubectl get nodes -o wide | grep master | cut -d ' ' -f 1 | xargs -I {} kubectl taint nodes {} node-role.kubernetes.io/master=:NoSchedule