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
Decrypt all encrypted manifests ksops decrypt-all
Initialize Kubernetes Secret defaults ksops init
Encrypt all plaintext Secret manifests ksops encrypt-all
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 --age age1...
ksops edit secret.yaml
ksops cat secret.yaml
ksops encrypt secret.yaml --in-place
ksops encrypt-all ./manifests
ksops decrypt secret.yaml
ksops decrypt-all ./manifests
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 --age age1... creates 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.2.2.tar.gz (25.5 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.2.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ksops-0.2.2.tar.gz
  • Upload date:
  • Size: 25.5 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.2.2.tar.gz
Algorithm Hash digest
SHA256 b14a932403a760ead3ef993620c3867099e3a5e70ae6b9c9986b3e2a53606e3c
MD5 f7a1365383fdc106e5ab2e79b7eec397
BLAKE2b-256 48c1cd3ba08fac86f26ef50a6775486df1750c06c9d6f1be0b8e284fbb06975a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ksops-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.7 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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a6cbe5326f83ea14cbba469f2ed9458fcc733bb2c9eb9553fe1aeece83d109a
MD5 df3124f2e8d57486e7ac5efd9c171627
BLAKE2b-256 89f8b7a1b4ae9c66a41ab2abf6354a8a06aa05e7fcf17f866dc070d9c623bf00

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