Giter Site home page Giter Site logo

corneliusweig / ketall Goto Github PK

View Code? Open in Web Editor NEW
652.0 8.0 27.0 4.76 MB

Like `kubectl get all`, but get really all resources

License: Apache License 2.0

Go 70.61% Makefile 7.21% Dockerfile 0.40% Shell 21.78%
kubectl-plugins kubectl kubectl-plugin get resources resource-list k8s overview

ketall's Introduction

ketall

Build Status Go Report Card LICENSE Releases

Kubectl plugin to show really all kubernetes resources

Intro

For a complete overview of all resources in a kubernetes cluster, kubectl get all --all-namespaces is not enough, because it simply does not show everything. This helper lists really all resources the cluster has to offer.

Demo

ketall demo

Examples

Get all resources...

  • ... excluding events (this is hardly ever useful)

    ketall
  • ... including events

    ketall --exclude=
  • ... created in the last minute

    ketall --since 1m

    This flag understands typical human-readable durations such as 1m or 1y1d1h1m1s.

  • ... in the default namespace

    ketall --namespace=default
  • ... at cluster level

    ketall --only-scope=cluster
  • ... using list of cached server resources

    ketall --use-cache

    Note that this may fail to show really everything, if the http cache is stale.

  • ... and combine with common kubectl options

    KUBECONFIG=otherconfig ketall -o name --context some --namespace kube-system --selector run=skaffold

Also see Usage.

Installation

There are several ways to install ketall. The recommended installation method is via krew.

Via krew

Krew is a kubectl plugin manager. If you have not yet installed krew, get it at https://github.com/kubernetes-sigs/krew. Then installation is as simple as

kubectl krew install get-all

The plugin will be available as kubectl get-all, see doc/USAGE for further details.

Binaries

When using the binaries for installation, also have a look at doc/USAGE.

Linux

curl -Lo ketall.gz https://github.com/corneliusweig/ketall/releases/download/v1.3.8/ketall-amd64-linux.tar.gz && \
  gunzip ketall.gz && chmod +x ketall && mv ketall $GOPATH/bin/

OSX

curl -Lo ketall.gz https://github.com/corneliusweig/ketall/releases/download/v1.3.8/ketall-amd64-darwin.tar.gz && \
  gunzip ketall.gz && chmod +x ketall && mv ketall $GOPATH/bin/

Windows

https://github.com/corneliusweig/ketall/releases/download/v1.3.8/ketall-amd64-windows.zip

From source

Build on host

Requirements:

  • go 1.16 or newer
  • GNU make
  • git

Compiling:

export PLATFORMS=$(go env GOOS)
make all   # binaries will be placed in out/

Build in docker

Requirements:

  • docker

Compiling:

mkdir ketall && chdir ketall
curl -Lo Dockerfile https://raw.githubusercontent.com/corneliusweig/ketall/master/Dockerfile
docker build . -t ketall-builder
docker run --rm -v $PWD:/go/bin/ --env PLATFORMS=$(go env GOOS) ketall-builder
docker rmi ketall-builder

Binaries will be placed in the current directory.

Future

  • additional arguments could be used to filter the result set

Credits

Idea by @ahmetb https://twitter.com/ahmetb/status/1095374856156196864

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.