Last active
June 14, 2025 18:18
-
-
Save Loupeznik/939ba979f80f76cffb0a8307eafcc224 to your computer and use it in GitHub Desktop.
Get and decode k8s secret values via powershell
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 secret <secret_name> -o json | ` | |
ConvertFrom-Json | ` | |
ForEach-Object { $_.data.PSObject.Properties } | ` | |
ForEach-Object { "$($_.Name): $([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_.Value)))" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment