Created
November 29, 2016 20:11
-
-
Save technosophos/0363bdc408f79e8c2306fdef04a943db to your computer and use it in GitHub Desktop.
Query a cluster to populate a Helm chart
This file contains hidden or 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
#!/bin/bash | |
kinds="cs,cm,ds,deploy,ev,ep,hpa,ing,jobs,limits,po,pv,pvc,quota,rs,rc,secrets,sa,svc" | |
tpl="{{range .items}}{{.metadata.name}} {{end}}" | |
if [[ "" == $1 ]]; then | |
echo name of app is required | |
exit 1 | |
fi | |
mkdir -p $1 | |
kubectl get -l "app" --export -a $kinds -o yaml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment