kubernetes get deployment xxx -o yaml > deployment.yaml
过滤噪音
for i in `ls $1`;do sed -i '/{}/d' $1\/$i sed -i '/^status:/,$d' $1\/$i sed -i '/managedFields:/,/manager: kube-controller-manager/d' $1\/$i sed -i '/annotations:/,/generation:/d' $1\/$i sed -i '/resourceVersion:/,/uid:/d' $1\/$i sed -i '/time/d' $1\/$i sed -i '/terminationMessage/d' $1\/$i sed -i '/creationTimestamp/d' $1\/$i sed -i '/operation:/d' $1\/$i sed -i '/schedulerName:/d' $1\/$i sed -i '/selfLink:/d' $1\/$i done
posted on 2021-02-22 20:02 __director 阅读(124) 评论(0) 编辑 收藏 举报