Skip to main content

A SOPS companion CLI for editing, validating, and rekeying Kubernetes secrets

Project description

ksops

A SOPS companion CLI for editing, validating, and rekeying Kubernetes secrets.

ksops does not replace SOPS. It uses the sops binary for encryption, decryption, editing, and key updates, while adding small GitOps-oriented workflows around it.

Why ksops?

sops is excellent at encrypting files with age, GPG, KMS, and cloud key services. But Kubernetes secret repos often need repeatable project workflows around that core.

ksops is a DX layer on top of sops for Kubernetes/GitOps repositories:

sops ksops
Encrypt files for GitOps ✅ (via sops)
Edit encrypted files ksops edit
Decrypt to stdout ksops cat
Initialize Kubernetes Secret defaults ksops init
Rekey one file from .sops.yaml sops updatekeys ksops rekey
Rekey all encrypted manifests ksops rekey-all
Check plaintext Kubernetes Secret leaks ksops validate-all

Commands

ksops init
ksops edit secret.yaml
ksops cat secret.yaml
ksops encrypt secret.yaml --in-place
ksops decrypt secret.yaml
ksops rekey secret.yaml
ksops rekey-all ./manifests
ksops validate-all ./manifests
ksops completion zsh

Configuration

Encryption policy stays in native .sops.yaml.

creation_rules:
  - path_regex: .*secret.*\.ya?ml$
    encrypted_regex: ^(data|stringData)$
    age: age1...

ksops init can create a starter .sops.yaml, but all encryption behavior is still handled by SOPS itself.

Shell Completion

source <(ksops completion bash)
source <(ksops completion zsh)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ksops-0.1.0.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ksops-0.1.0-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file ksops-0.1.0.tar.gz.

File metadata

  • Download URL: ksops-0.1.0.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ksops-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0077c17f50caac995f258125a1da5eba1033617397246cf02802697bea9cc7db
MD5 ab9f60a90b6bf9ab489cebcd38333e5b
BLAKE2b-256 8730673bbf2cf253aeb0a68fbf30cc9a40111dfa85c600fafed21fcf242bf01a

See more details on using hashes here.

File details

Details for the file ksops-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ksops-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.13 {"installer":{"name":"uv","version":"0.11.13","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for ksops-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a42379c9b9193bf1e574e7e796ec4e2b24f47729b3da7841fbf832f1473b421c
MD5 b69d884bc8bb42a2bf978c69592483c6
BLAKE2b-256 ba0d88dfdb96b2f3ef6c196e7e98da37e465970e91840b8ee171d8318d519ff5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page