When working with Kubernetes, you’ll often want to find a specific Pod using part of the name or even a regular expression. For this, I keep a handy alias in my bash profile: podgrep. Simple, effective and has a very memorable name.
alias podgrep='kubectl get pods -o wide --all-namespaces | grep '
To find a pod, you then run:
You can also use regular expressions, like
Or list all pods except the ones matching the pattern:
podgrep -v fluent