This is an automated email from the ASF dual-hosted git repository.
ywkim pushed a commit to branch cnb
in repository https://gitbox.apache.org/repos/asf/bigtop.git
The following commit(s) were added to refs/heads/cnb by this push:
new b40d864 BIGTOP-3245: Add kubectl plugin for Bigtop
b40d864 is described below
commit b40d864a72ec1e1a3c23404bc9ee1a27587f831a
Author: Youngwoo Kim <[email protected]>
AuthorDate: Mon Oct 14 16:32:33 2019 +0900
BIGTOP-3245: Add kubectl plugin for Bigtop
---
kubernetes/kubectl/plugin/README.md | 13 +++++++++++++
kubernetes/kubectl/plugin/kubectl-bigtop | 17 +++++++++++++++++
2 files changed, 30 insertions(+)
diff --git a/kubernetes/kubectl/plugin/README.md
b/kubernetes/kubectl/plugin/README.md
new file mode 100644
index 0000000..1c3ae97
--- /dev/null
+++ b/kubernetes/kubectl/plugin/README.md
@@ -0,0 +1,13 @@
+# kubectl plugin for Apache Bigtop
+
+```
+$ export BIGTOP_HOME=/bigtop/ && export
PATH=$PATH:$BIGTOP_HOME/kubernetes/kubectl/plugin
+$ kubectl plugin list
+$ kubectl bigtop version
+```
+Or
+```
+sudo chmod +x ./kubectl-bigtop
+sudo mv ./kubectl-bigtop /usr/local/bin
+```
+
diff --git a/kubernetes/kubectl/plugin/kubectl-bigtop
b/kubernetes/kubectl/plugin/kubectl-bigtop
new file mode 100755
index 0000000..6dd2040
--- /dev/null
+++ b/kubernetes/kubectl/plugin/kubectl-bigtop
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+
+echo "Kubectl plugin for Apache Bigtop"
+
+# version of Bigtop plugin
+if [[ "$1" == "version" ]]
+then
+ echo "2.0.0"
+ exit 0
+fi
+
+if [[ "$1" == "cluster-info" ]]
+then
+ kubectl cluster-info
+ exit 0
+fi
+