Skip to content

Instantly share code, notes, and snippets.

@carlosjgp
Created May 29, 2019 08:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save carlosjgp/3301fa2bb1e32dd781fc7d4ac8a285b0 to your computer and use it in GitHub Desktop.
Save carlosjgp/3301fa2bb1e32dd781fc7d4ac8a285b0 to your computer and use it in GitHub Desktop.
kubectl Cheatsheet
# List all the CRDs from all the NAMESPACES
for ns in $(kubectl get ns -o jsonpath='{.items[*].metadata.name}'); do \
echo "-------- NS: $ns -------- \n"; \
for crd in $(kubectl get crd -o jsonpath='{.items[*].spec.names.kind}'); do \
echo "-------- CRD: $crd -------- \n"; \
kubectl get $crd -n $ns; \
done; \
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment