bergerx / kubectl-status

A kubectl plugin to print a human-friendly output that focuses on the status fields of the resources in kubernetes.
Apache License 2.0
108 stars 5 forks source link
kubectl-plugin kubectl-plugins kubernetes

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

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.