Last active
July 11, 2022 07:26
-
-
Save sneako/663789801eb94cafc82e09fd737fec75 to your computer and use it in GitHub Desktop.
Dump Kubernetes state as yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# set -x | |
mkdir output | |
KUBECONFIG=/Users/nico/real-kubeconfig | |
SKIP_RESOURCES=( | |
apiservices | |
bindings | |
blockaffinities | |
certificaterequests | |
certificatesigningrequests | |
challenges | |
clusterinformations | |
componentstatuses | |
controllerrevisions | |
csidrivers | |
csinodes | |
customresourcedefinitions | |
endpoints | |
events | |
felixconfigurations | |
globalnetworkpolicies | |
globalnetworksets | |
hostendpoints | |
ipamblocks | |
ipamconfigs | |
ipamhandles | |
ippools | |
limitranges | |
localsubjectaccessreviews | |
namespaces | |
flowschemas | |
prioritylevelconfigurations | |
tlscertificatedelegations | |
ingressclasses | |
nodes | |
orders | |
persistentvolumeclaims | |
persistentvolumes | |
pods | |
priorityclasses | |
selfsubjectaccessreviews | |
selfsubjectrulesreviews | |
subjectaccessreviews | |
volumeattachments | |