Skip to content

Instantly share code, notes, and snippets.

@filintod
filintod / get_secret_files.sh
Last active October 4, 2019 18:29
Get kubernetes files from secret
#!/bin/bash
# secret name is the first
# namespace is optional second
# there is not much validation
secret_name="${1}"
ns=""
[[ $2 ]] && ns="-n ${2}"
secret_files=($(kubectl get secret ${secret_name} ${ns}\