Skip to content

Easily encode and decode kubernetes secret manifests

License

Notifications You must be signed in to change notification settings

logitick/secreto

Repository files navigation

Build Status Test Coverage Codacy Badge

secreto

a cli tool to encode and decode kubernetes secrets

How to use

decoding a secrets.yml to its literal values

./encoded_secrets.yml
apiVersion: v1
kind: Secret
metadata:
  name: database-secret-config
type: Opaque
data:
  username: QXp1cmVEaWFtb25k
  password: aHVudGVyMg==
$ secreto decode ./encoded_secrets.yml 
apiVersion: v1
kind: Secret
metadata:
  name: database-secret-config
type: Opaque
data:
  username: AzureDiamond
  password: hunter2

# save to a file
$ secreto decode ./encoded_secrets.yml > secrets.yml

encoding a literal secrets.yml to base64

./secrets.yml
apiVersion: v1
kind: Secret
metadata:
  name: database-secret-config
type: Opaque
data:
  username: AzureDiamond
  password: hunter2
$ secreto encode ./secrets.yml
apiVersion: v1
kind: Secret
metadata:
  name: database-secret-config
type: Opaque
data:
  username: QXp1cmVEaWFtb25k
  password: aHVudGVyMg==

Roadmap

  • encryption & decryption of the secret values to make it safe to store in VCS