Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List pod images by app #148

Merged
merged 12 commits into from
Sep 6, 2023
15 changes: 15 additions & 0 deletions specs/kubernetes/list_pod_images_by_app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: List all Kubernetes pods by app label
command: >
kubectl get pods -l app={{app}} -o jsonpath='{range .items[*]}{"\n"}{range .spec.containers[*]}{.name}{"\t"}{.image}{"\n"}{end}{end}' | sort | uniq
tags:
- kubernetes
description: Lists the images of pods fetched by app label
arguments:
- name: app
description: The value of the app label
default_value: ~
source_url: "https://kubernetes.io/docs/reference/kubectl/jsonpath/"
author: pkaramol
author_url: "https://www.linkedin.com/in/pkaramol/"
shells: []
Loading