Skip to content

KnVerey/k8s-workflow-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

k8s-workflow-utils

See individual files for more detailed descriptions.

chns (change namespace)

Usage: chns NAMESPACE

NAMESPACE can be the shortest substring that uniquely identifies the namespace within the current context.

Zsh completions available.

chctx (change context)

Usage: chctx CONTEXT [NAMESPACE]

CONTEXT can be the shortest substring that uniquely identifies the context.

Zsh completions available. NAMESPACE feature uses chns.

exec-pod

Usage: exec-pod POD_TYPE [CONTAINER]

Chooses a pod whose name starts with POD_TYPE and executes kubectl exec -ti "$POD" -c=$CONTAINER -- sh.

E.g. exec-pod web to enter a pod in the "web" deployment

kgoom (kubectl get oom)

Usage: kgoom [ARGS]

Returns information about any pods that have containers that have been OOMKilled. Any args passed to the script (e.g. namespace, context flags) will be passed to the kubectl command.

Example:

NAMESPACE  /  NAME  /  CONTAINERS  /  LAST TERMINATION REASON  /  LAST TERMINATION TIME
my-app        web      nginx          OOMKilled                   2017-11-24T09:12:38Z

kubernetes-context zsh theme

Looks like this:

screenshot

Or in a git repo:

screenshot

Or if the last command failed:

screenshot

kube_context_aliases zsh plugin

Creates aliases named after your kube contexts that switch to the context in question. The alias for minikube is minik to avoid conflict with the minikube binary.

WARNING: Think about what your context names might conflict with before using this!

Example: Given a kubeconfig containing context "fave", this plugin will alias fave to kubectl config use-context fave.

About

Collection of shell utilities for Kubernetes workflows. And a zsh theme.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages