Skip to content

Instantly share code, notes, and snippets.

@bzub
Created September 15, 2022 12:03
Show Gist options
  • Save bzub/0604de809d0c9462954710453439459b to your computer and use it in GitHub Desktop.
Save bzub/0604de809d0c9462954710453439459b to your computer and use it in GitHub Desktop.
Sideo Hacks

Sidero Hacks

Delete Cluster, Keep PKI

You just need to keep the CLUSTER_NAME-ca and CLUSTER_NAME-talos secrets around.

To do this you an remove the owner reference from them.

cluster_name="example-cluster"
for secret in "${cluster_name}-ca" "${cluster_name}-talos"; do
  kubectl patch "${secret}" --type=json --patch="$(cat <<EOF
- op: remove
  path: /metadata/ownerReferences
EOF
)"
done

Then you can proceed with deleting and recreating the cluster resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment