Skip to content

Instantly share code, notes, and snippets.

@relaxdiego
Last active July 9, 2020 03:12
Show Gist options
  • Save relaxdiego/c44e437e02a609d3760f8b2f40213980 to your computer and use it in GitHub Desktop.
Save relaxdiego/c44e437e02a609d3760f8b2f40213980 to your computer and use it in GitHub Desktop.
k0s! It's k1s minus the colors 😿
#!/bin/bash -e
resource=${1:-"pods"}; namespace=${2:-"default"}
watch -c "echo ' _ ___'; echo '| | __/ _ \ ___'; echo '| |/ / | | / __| Namespace: ${namespace}'; echo '| <| |_| \__ \ Resources: ${resource}'; echo '|_|\_\\\\\___/|___/'; echo; kubectl get -n "$namespace" "$resource" ${@:3}
@relaxdiego
Copy link
Author

relaxdiego commented Jul 9, 2020

Requirements

  1. Bash
  2. watch (the command, not the thing on your wrist)
  3. kubectl

Installation:

curl https://gist.githubusercontent.com/relaxdiego/c44e437e02a609d3760f8b2f40213980/raw/ad478da93d101aa743fb7fad67d6a4548388d805/k0s > ~/k0s
chmod +x ~/k0s

Sample commands

~/k0s
~/k0s all kube-system
~/k0s deployments kube-system -o wide
~/k0s pods kube-system -o name
~/k0s all,secrets,serviceaccount kube-system

Short link for this gist: https://bit.ly/icanhazk0s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment