kubectl 输出当前ns下的所有deploy的资源

k8s 自定义kubectl 输出当前ns下的所有deploy的资源template

root@hk-eks-ctl:~# kubectl get deploy -nbusiness-api-system -o template --template='{{range .items}}{{.metadata.name}}--replicas:{{.spec.replicas}}--{{range .spec.template.spec.containers}}cpu:{{.resources.limits.cpu}},mem:{{.resources.limits.memory}}{{end}}{{printf "\n"}}{{end}}'

changelog--replicas:1--cpu:1,mem:1Gi
sparkxads--replicas:2--cpu:1,mem:1Gi

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!