Last active
June 10, 2024 05:47
-
-
Save yuya-maemichi-synspective/728491dc3246c3c308246d0244b2d4c3 to your computer and use it in GitHub Desktop.
k8s snippets
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
pp %x(kubectl api-versions).scan(/(?:(?<group>\S+)\/)?(?<version>\w+)/) | |
pp %x(kubectl api-versions).split.map { /(?:(?<group>\S+)\/)?(?<version>\w+)/.match(_1)&.named_captures } |
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
kubectl api-versions | \ | |
ruby -ne 'pp /(?:(?<group>[^\/]*)\/)?(?<version>\w+)/.match($_)&.named_captures' |
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
/(?:(?<group>[^\/]+)\/)?(?<version>\w+)/ |
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
.stringData=(.data|with_entries(.value|=@base64d)) |
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
kubectl get --show-kind --ignore-not-found --namespace=sieve-dev --output=name $( | |
kubectl api-resources --namespaced --verbs=list --output=name | | |
paste -s -d',' - | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment