Kubectl--go-template

来自WILO随记
跳到导航跳到搜索

Deployments - image

kubectl get deployments. -n dsp-system -o go-template --template '{{range .items}}{{.metadata.name}}{{" -- "}}{{range .spec.template.spec.containers}}{{.image}}{{end}}{{"\n"}}{{end}}'


Pods - image

kubectl get pods -n dsp-system -o go-template --template '{{range .items}}{{.metadata.name}}{{" -- "}}{{range .spec.containers}}{{.image}}{{end}}{{"\n"}}{{end}}'