From 53bfe1d301093f08eacb10546db654bbdaacf461 Mon Sep 17 00:00:00 2001 From: Noah Masur Date: Wed, 5 Aug 2020 23:16:39 -0400 Subject: [PATCH] some convenience bins --- bin/biggest | 4 ++++ bin/kube-dashboard | 7 +++++++ bin/newest | 3 +++ bin/oldest | 3 +++ 4 files changed, 17 insertions(+) create mode 100755 bin/biggest create mode 100755 bin/kube-dashboard create mode 100755 bin/newest create mode 100755 bin/oldest diff --git a/bin/biggest b/bin/biggest new file mode 100755 index 0000000..1655ef3 --- /dev/null +++ b/bin/biggest @@ -0,0 +1,4 @@ +#!/usr/local/bin/nu + +ls | sort-by size | reverse | keep 10 + diff --git a/bin/kube-dashboard b/bin/kube-dashboard new file mode 100755 index 0000000..06fcc88 --- /dev/null +++ b/bin/kube-dashboard @@ -0,0 +1,7 @@ +#!/bin/sh + +kubectl -n kube-system get secret $(kubectl -n kube-system get secret | grep eks-admin | awk '{print $1}') -o json | jq -j --raw-output '.data.token' | base64 --decode | pbcopy + +open http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/#!/login + +kubectl proxy diff --git a/bin/newest b/bin/newest new file mode 100755 index 0000000..5d33ea8 --- /dev/null +++ b/bin/newest @@ -0,0 +1,3 @@ +#!/usr/local/bin/nu + +ls | sort-by modified | reverse | keep 5 diff --git a/bin/oldest b/bin/oldest new file mode 100755 index 0000000..a9cc938 --- /dev/null +++ b/bin/oldest @@ -0,0 +1,3 @@ +#!/usr/local/bin/nu + +ls | sort-by modified | keep 5