Exporting kubernetes resources from existing cluster in yaml file in RHOCP 4
Issue
- While exporting yaml its including a lot managed fields that don't needed for the new cluster, Increasing manual effort, to remove them from the yaml file, a lot of configmap/secret needs to import to the new cluster from the existing cluster.
apiVersion: v1
data:
app: bWR4cmVmZX
kind: Secret
metadata:
`annotations`:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"v1","kind":"Secret","metadata":{"annotations":{},"name":"xyz","namespace":"default"},"stringData":{"app":"xyz"}}
creationTimestamp: "2022-06-17T16:43:20Z"
managedFields:
- `apiVersion`: v1
fieldsType: FieldsV1
fieldsV1:
f:data:
.: {}
f:app: {}
f:metadata:
f:annotations:
.: {}
f:kubectl.kubernetes.io/last-applied-configuration: {}
f:type: {}
manager: kubectl-create
operation: Update
time: "XXXX-XX-XXT16:43:20Z"
name: xyz
namespace: default
`resourceVersion`: "444176293"
`uid`: 4479e906-921b-442e-bac7-65882926c794
`type`: Opaque
Environment
- Red Hat OpenShift Container Platform 4
- vSphere
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.