PHPackages                             tavsec/kubeseal-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. tavsec/kubeseal-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tavsec/kubeseal-php
===================

PHP wrapper for Kubeseal executable

1.0.0(2y ago)13[1 PRs](https://github.com/tavsec/kubeseal-php/pulls)MITPHPPHP ^8.2|^8.1|^8.0

Since Nov 25Pushed 2y ago1 watchersCompare

[ Source](https://github.com/tavsec/kubeseal-php)[ Packagist](https://packagist.org/packages/tavsec/kubeseal-php)[ RSS](/packages/tavsec-kubeseal-php/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

kubeseal-php
============

[](#kubeseal-php)

`kubeseal-php` is a PHP wrapper for [sealed-secrets `kubeseal` executable](https://github.com/bitnami-labs/sealed-secrets)that allows you to encrypt your Kubernetes secrets using a public key in PHP.

[![kubeseal-php](media/banner.png)](media/banner.png)[![Latest Stable Version](https://camo.githubusercontent.com/311a591378ade12aab1706159e4ccf96b8a32d2298fe3a56f040547f3ee784f5/68747470733a2f2f706f7365722e707567782e6f72672f7461767365632f6b7562657365616c2d7068702f762f737461626c65)](https://poser.pugx.org/tavsec/kubeseal-php/v/stable)[![Total Downloads](https://camo.githubusercontent.com/44563d99dfbf555548e51185f070bd8448987dd572557675996fa9c1dc643e96/68747470733a2f2f706f7365722e707567782e6f72672f7461767365632f6b7562657365616c2d7068702f642f746f74616c2e737667)](https://packagist.org/packages/tavsec/kubeseal-php)[![License](https://camo.githubusercontent.com/af30e4a5eb6de14cc9e75a10b95d91b33a0a4c982b08d37b1f69a4aeda6a5cc4/68747470733a2f2f706f7365722e707567782e6f72672f7461767365632f6b7562657365616c2d7068702f6c6963656e73652e737667)](https://packagist.org/packages/tavsec/kubeseal-php)

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- `kubeseal` executable
- sealed secrets public key\* OR
- `kubeseal` executable connected to Kubernetes cluster

*\* public key can be fetched by running `kubeseal --fetch-cert > kubeseal_cert.pem`*

Installation
------------

[](#installation)

This package can be installed on any PHP version &gt;= 8.1 using [composer](https://getcomposer.org/).

```
composer require tavsec/kubeseal-php
```

Usage
-----

[](#usage)

Currently, `kubeseal-php` supports [raw encryption of secrets](https://github.com/bitnami-labs/sealed-secrets?tab=readme-ov-file#raw-mode-experimental) using `kubeseal` executable. This means that the secret values can be encrypted one by one, and the resulting encrypted values can be used in Kubernetes (sealed secrets) manifests.

In the future releases we might support encrypting the whole secret at once, using multiple values, and producing the full manifest.

All 3 encryption scopes are supported: `strict`, `cluster-wide` and `namespace-wide`.

```
use Tavsec\KubesealPhp\Kubeseal;

$kubeseal = new Kubeseal();
$kubeseal->setKubesealPath("/usr/bin/kubeseal");

// Required only if you don't have kubeseal connected to Kubernetes cluster
$kubeseal->setCertificatePath("kubeseal_cert.pem");

// Encrypt using strict scope
$sealedValue = $kubeseal->encryptRaw(
    data: "my-secret-value",
    scope: Kubeseal::SCOPE_STRICT,
    secretName: "secret-name",
    namespace: "namespace"
);

// Encrypt using namespace-wide scope
$sealedValue = $kubeseal->encryptRaw(
    data: "my-secret-value",
    scope: Kubeseal::SCOPE_NAMESPACE,
    namespace: "namespace"
);

// Encrypt using cluster-wide scope
$sealedValue = $kubeseal->encryptRaw(
    data: "my-secret-value",
    scope: Kubeseal::SCOPE_CLUSTER
);

echo $sealedValue; // #Ag...

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

952d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ae7b8a91f962e2cab46cc876e52a8f99384fdb6519b18d7255a49fa59fe52e0e?d=identicon)[tavsec](/maintainers/tavsec)

---

Top Contributors

[![tavsec](https://avatars.githubusercontent.com/u/31708774?v=4)](https://github.com/tavsec "tavsec (12 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tavsec-kubeseal-php/health.svg)

```
[![Health](https://phpackages.com/badges/tavsec-kubeseal-php/health.svg)](https://phpackages.com/packages/tavsec-kubeseal-php)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
