Skip to content

Commit

Permalink
feat: Add K8 commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jadenlemmon committed Nov 10, 2020
1 parent bf25d46 commit 9c353f2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
12 changes: 11 additions & 1 deletion bin/handler
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

VERSION='1.1.1'
VERSION='1.2.0'

LOGO='
_ _ _ _
Expand Down Expand Up @@ -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() {
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 9c353f2

Please sign in to comment.