Skip to content

Script to interactively select Deployment|ReplicaSet to print logs produced by previous containers under the selected resource.

License

Notifications You must be signed in to change notification settings

akadir/kubectl-iprevlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

kubectl-iprevlog

Script to interactively select Deployment|ReplicaSet to print logs produced by previous containers under the selected resource.

Installation

  • Install kubectl, stern, jq, fzf.
  • Download kubectl-iprevlog and save somewhere under the $PATH as executable file.

Usage

kubectl-iprevlog

Print previous container logs of selected resource.

Usage:
 kubectl-iprevlog
 kubectl-iprevlog -h
 kubectl-iprevlog -r
 kubectl-iprevlog -l 15
 kubectl-iprevlog -r -l 15

Flags:
  -l number of lines    Default: 20
  -r kind               Use replicasets to select resource. Default: deployment
  -h help               Prints this help

Dependencies:

 - kubectl: https://kubernetes.io/docs/tasks/tools/install-kubectl/
 - jq: https://stedolan.github.io/jq/download/
 - fzf: https://github.com/junegunn/fzf
 - awk

About

Script to interactively select Deployment|ReplicaSet to print logs produced by previous containers under the selected resource.

Topics

Resources

License

Stars

Watchers

Forks

Languages