-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.k8s
33 lines (27 loc) · 1.06 KB
/
Makefile.k8s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# vim:filetype=make
ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
.PHONY: install-kubectl
install-kubectl:
$(eval LATEST=$(shell curl -L -s https://dl.k8s.io/release/stable.txt))
curl -vLO "https://dl.k8s.io/release/$(LATEST)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
.PHONY: install-krew
install-krew:
curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz"
tar xzf krew-linux_amd64.tar.gz
./krew-linux_amd64 install krew
.PHONY: install-plugins
install-plugins:
kubectl krew install node-shell
kubectl krew install ns
kubectl krew install neat
.PHONY: fish
fish:
rm -f ${HOME}/.config/fish/functions/mql-k8s.fish
ln -s ${ROOT_DIR}/fish/functions/mql-k8s.fish ${HOME}/.config/fish/functions/mql-k8s.fish
fish -c 'fisher install evanlucas/fish-kubectl-completions'
.PHONY: bash
bash:
rm -f ${HOME}/.bashrc.d/mql-k8s.sh
ln -s ${ROOT_DIR}/bashrc/mql-k8s.sh ${HOME}/.bashrc.d/mql-k8s.sh
kubectl completion bash > ${HOME}/.bash_completion.d/kubectl