Created
November 22, 2018 07:22
-
-
Save brandedoutcast/08eb3191a0b71389f0948edd00637e8e to your computer and use it in GitHub Desktop.
Decode kubectl secrets in PowerShell
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
kubectl get secrets -o json | ConvertFrom-Json | select -ExpandProperty items | ? data | select -ExpandProperty data | % { $_.PSObject.Properties | % { $_.Name + [System.Environment]::NewLine + [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_.Value)) + [System.Environment]::NewLine + [System.Environment]::NewLine } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment