Skip to content

Instantly share code, notes, and snippets.

@Loupeznik
Last active June 14, 2025 18:18
Show Gist options
  • Save Loupeznik/939ba979f80f76cffb0a8307eafcc224 to your computer and use it in GitHub Desktop.
Save Loupeznik/939ba979f80f76cffb0a8307eafcc224 to your computer and use it in GitHub Desktop.
Get and decode k8s secret values via powershell
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