events按照时间排序

kubectl get events --sort-by='.lastTimestamp'

获取所有的Deployment的Request资源

kubectl get deployment -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{range .spec.template.spec.containers[*]}{"\t"}{.name}{":"}{.resources.requests.cpu}{end}{"\n"}'

json获取所有的Deployment和副本

kubectl get deployment -o=jsonpath='{range .items[*]}{.metadata.name}{" "}{.spec.replicas}{"\n"}{end}'

Copyright © 运维知识库 all right reserved,powered by Gitbook文件修订时间: 2023-09-19 10:45:38

results matching ""

    No results matching ""