Skip to content

Commit

Permalink
Merge pull request #303 from AkihiroSuda/make-kubectl
Browse files Browse the repository at this point in the history
Add `make kubectl`
  • Loading branch information
AkihiroSuda authored Sep 15, 2023
2 parents 2ab0861 + 4bccc22 commit 4f81b6e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/kubeconfig
/kubectl
/join-command
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/kubeconfig
/kubectl
/join-command
11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@ kubeconfig:
$(COMPOSE) cp $(NODE_SERVICE_NAME):/etc/kubernetes/admin.conf ./kubeconfig
@echo "# Run the following command by yourself:"
@echo "export KUBECONFIG=$(shell pwd)/kubeconfig"
ifeq ($(shell command -v kubectl 2> /dev/null),)
@echo "# To install kubectl, run the following command too:"
@echo "make kubectl"
endif

.PHONY: kubectl
kubectl:
$(COMPOSE) cp $(NODE_SERVICE_NAME):/usr/bin/kubectl ./kubectl
@echo "# Run the following command by yourself:"
@echo "export PATH=$(shell pwd):\$$PATH"
@echo "source <(kubectl completion bash)"

.PHONY: join-command
join-command:
Expand Down

0 comments on commit 4f81b6e

Please sign in to comment.