From 9c353f2dfa9b00eebd320f21a75612d113bf1e4f Mon Sep 17 00:00:00 2001 From: Jaden Lemmon Date: Tue, 10 Nov 2020 10:02:14 -0600 Subject: [PATCH] feat: Add K8 commands --- README.md | 4 ++++ bin/handler | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a854375..5705c05 100644 --- a/README.md +++ b/README.md @@ -59,4 +59,8 @@ rm -rf jlemm45-handler-* iip Get instance IP from name cu Get current aws iam user skc Set the kube config from eks cluster + + K8 + kc Get current K8 context + kcs Get available K8 contexts ``` diff --git a/bin/handler b/bin/handler index 3e3c2df..4a7b073 100755 --- a/bin/handler +++ b/bin/handler @@ -1,6 +1,6 @@ #!/bin/sh -VERSION='1.1.1' +VERSION='1.2.0' LOGO=' _ _ _ _ @@ -44,6 +44,10 @@ COMMANDS=' iip Get instance IP from name cu Get current aws iam user skc Set the kube config from eks cluster + + K8 + kc Get current K8 context + kcs Get available K8 contexts ' check_for_update() { @@ -245,6 +249,12 @@ elif [ "$1" == "cu" ]; then elif [ "$1" == "skc" ]; then aws eks update-kubeconfig --name $2 +elif [ "$1" == "kc" ]; then + kubectl config current-context + +elif [ "$1" == "kcs" ]; then + kubectl config get-contexts + else usage log_error "Must provide a command see list of commands"