Files
CmiiDeploy/998-常用脚本/备份脚本/按照独立应用备份.md
2026-05-19 14:28:44 +08:00

11 lines
816 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

请实现yq工具使用kubectl工具针对特定的命名空间进行完整的备份
1. 需要去除metadata中的managedFields、annotations、creationTimestamp、uid、resourceVersion、status、selfLink等字段
2. 去除status字段
需要按照应用名称按照deployment的名称作为应用名称进行切分备份即为一个命名空间下有多个应用每个应用包含deployment、service、configmap、statefulset等资源每个应用的备份文件需要独立出来
例如一个命名空间下的应用名称为app1、app2、app3那么备份文件需要为app1.yaml、app2.yaml、app3.yaml每个文件中包含对应的资源。
需要单独备份ingress部分的资源
请你参考现在的备份命名空间实现一个新的shell脚本实现上述的功能