ksedit
Kubernetes Secret Edit
安装
ksedit
$ chmod +x /usr/local/bin/ ksedit
# mac
$ curl -L https://github*.*com*/plaidev/ksedit/releases/download/v0.0.5/ ksedit _darwin_amd64 -o /usr/local/bin/ ksedit
$ chmod +x /usr/local/bin/ ksedit \”>
# linux $ curl -L https://github*.*com*/plaidev/ksedit/releases/download/v0.0.5/ ksedit _linux_amd64 -o /usr/local/bin/ ksedit $ chmod +x /usr/local/bin/ ksedit # mac $ curl -L https://github*.*com*/plaidev/ksedit/releases/download/v0.0.5/ ksedit _darwin_amd64 -o /usr/local/bin/ ksedit $ chmod +x /usr/local/bin/ ksedit
用法
管道或filepath
ksedit > ./scret-edited.yml
# or
$ ksedit ./secret.yml > ./scret-edited.yml\”>
$ cat ./secret.yml | ksedit > ./scret-edited.yml # or $ ksedit ./secret.yml > ./scret-edited.yml
编辑和写
$ ksedit -w ./secret.yml
手动解码和编码
ksedit -d ./secret.yml > ./secret.dec.yml
$ vim ./secret.dec.yml
$ ksedit -e ./secret.dec.yml > ./secret.yml\”>
$ ksedit -d ./secret.yml > ./secret.dec.yml $ vim ./secret.dec.yml $ ksedit -e ./secret.dec.yml > ./secret.yml
选项
ksedit [global options] filepath
ENVS:
$EDITOR (default \”vim\”)
GLOBAL OPTIONS:
–write, -w write secret
–encode, -e encode secret
–decode, -d decode secret
–help, -h show help
–version, -v print the version\”>
USAGE: ksedit [global options] filepath ENVS: $EDITOR (default \"vim\") GLOBAL OPTIONS: --write, -w write secret --encode, -e encode secret --decode, -d decode secret --help, -h show help --version, -v print the version
