Code Monkey home page Code Monkey logo

kubectl-status's Introduction

kubectl status

A kubectl plugin to print a human-friendly output that focuses on the status fields of the resources in kubernetes.

Just a different representation of the kubernetes resources (next to get and describe).

This plugin uses templates for well-known API conventions and has support for hardcoded resources. Not all resources are fully supported.

Installation

You can install kubectl status using the Krew, the package manager for kubectl plugins.

After you install Krew, just run:

kubectl krew install status
kubectl status --help

Upgrade

Assuming you installed using Krew:

kubectl krew upgrade status

Demo

Example Pod: pod

Example StatefulSet: statefulset

Example Deployment and ReplicaSet deployment-replicaset

Example Service: service

Features

  • aims for ease of understanding the status of a given resource,
  • aligned with other kubectl cli subcommand usages (just like kubectl get or kubectl describe),
  • uses colors extensively for a better look and feel experience, while a white-ish output means everything is ok, red-ish output strongly indicates something wrong,
  • erroneous/impacting states are explicit and obvious,
  • explicit messages for not-so-easy-to-understand status (e.g., ongoing rollout),
  • goes the extra mile for better expressing the status (e.g., show spec diff for ongoing rollouts),
  • compact, non-extensive output to keep it sharp,
  • no external dependencies, doesn't shell out, and so doesn't depend on client/workstation configuration

Usage

In most cases, replacing a kubectl get ... with a kubectl status ... would be sufficient.

Examples:

kubectl status pods                     # Show status of all pods in the current namespace
kubectl status pods --all-namespaces    # Show status of all pods in all namespaces
kubectl status deploy,sts               # Show status of all Deployments and StatefulSets in the current namespace
kubectl status nodes                    # Show status of all nodes
kubectl status pod my-pod1 my-pod2      # Show status of some pods
kubectl status pod/my-pod1 pod/my-pod2  # Same with previous
kubectl status svc/my-svc1 pod/my-pod2  # Show status of various resources
kubectl status deployment my-dep        # Show status of a particular deployment
kubectl status deployments.v1.apps      # Show deployments in the "v1" version of the "apps" API group.
kubectl status node -l node-role.kubernetes.io/master  # Show status of nodes marked as master

Development

Please see CONTRIBUTING.md file for development related documents.

License

Apache 2.0. See LICENSE.

kubectl-status's People

Contributors

bergerx avatar dependabot-preview[bot] avatar dependabot[bot] avatar jie211 avatar

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.