/k64

CLI that help you encode normal string in data fields of Kubernetes secret YAML to base64.

Primary LanguageGoMIT LicenseMIT

k64

CLI that help you encode normal string in data fields of Kubernetes secret yaml to base64.

GitHub go.mod Go version https://goreportcard.com/badge/github.com/thetkpark/k64 https://img.shields.io/github/license/thetkpark/cscms Publish

forthebadge forthebadge

When writing the Kubernetes secret declaration file in YAML format, the value of the data fields must be encoded using base64. I was annoy to just convert each secret one-by-one. Therefore, I built this CLI to help convert the normal secret value to base64 string.

ezgif-2-bb5097fc4a64

Prerequisites

Install Go from https://golang.org

Installation

go get -u github.com/thetkpark/k64
go install github.com/thetkpark/k64

Usage

To encode from string to base64

k64 encode <filename>

By default the output of that YAML file will be printed to stdout. You can use -o to write the output to another file or -s to save output to the save file.

k64 encode <filename> -s
k64 encode <filename> -o <filename>

To decode from base64 to string. The flag -o and -s can also be used here.

k64 decode <filename>