Please find steps below for generating the required metadata to restore the snapshot
1. Get snapshotFile.metadata and base64 decode:
echo "<base64 string>" | base64 -d
2. Take provisioning-cluster-spec and extract to file:
echo "<base64 string>" | base64 -d | gunzip > cluster-provisioning-spec.json
3. edit cluster-provisioning-spec.json as required, e.g. update kubernetesVersion
4. Create base64 encoded gzip:
cat cluster-provisioning-spec.json | tr -d '\n' | gzip | base64 -w0
5. Create metadata resource in metadata.json:
{"provisioning-cluster-spec":"<cluster-provisioning-spec-base64>"}
6. Base64 encode metadata.json:
cat metadata.json | base64 -w0
No comments:
Post a Comment