Skip to content

Conversation

@gbarideau
Copy link
Contributor

@gbarideau gbarideau commented Nov 6, 2025

What type of Pull Request is this?

  • New guide(s)

Description

New documentation to explain how to use Kubernetes External Secret Operator with the OVHcloud Secret Manager

Mandatory information

The translations in this Pull Request have been done using:

  • OVHcloud integrated translation LLM

  • Systran

  • Other tool (specify which tool was used)

  • This Pull Request didn't require any translation.

  • This Pull Request can be merged as soon as possible.

  • This Pull Request content should be replicated for the US OVHcloud documentation : YES

kind: SealedSecret
metadata:
name: token-secret
namespace: default
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
namespace: default
namespace: default

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

il n'est pas conseillé de mettre des ressources perso dans le namespace default.


#### Configure External Secret Operator

First, setup a `SecretStore` that is responsible of the synchronization with the Secret Manager.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ClusterSecretStore instead, the SecretStore doesn't work.
May change all appearance of it.

Then, install kubeseal cli to encrypt Secrets into Sealed Secrets

```bash
KUBESEAL_VERSION='' # Set this to, for example, KUBESEAL_VERSION='0.23.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.33.1 est la version que je viens d'installer, la plus recente.
Le readme dont est extrait ce code est pas super a jour, donc plutot :

KUBESEAL_VERSION=$(curl -s https://api.github.com/repos/bitnami-labs/sealed-secrets/tags | jq -r '.[0].name' | cut -c 2-)

helm install external-secrets \
external-secrets/external-secrets \
-n external-secrets \
--create-namespace \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--create-namespace \
--create-namespace

Add the `user_pat` as a secret to be able to use it in the charts.

```yaml
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
---

First, setup a `ClusterSecretStore` that is responsible of the synchronization with the Secret Manager.
We configure the ClusterSecretStore using HashiCorp Vault with token authentification and with the OKMS endpoint as backend.

Add the `user_pat` as a secret to be able to use it in the charts.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cette etape est à mettre apres installation de sealed-secret, dans la section "Setup Sealed Secret (optionnal)"

#### Use External Secret Operator

Once the `ClusterSecretStore` is setup you can define `ExternalSecret` that comes from the secret manager.
In the example we use a secret already created on the Secret Manager:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In the example we use a secret already created on the Secret Manager:
In the example we use a secret already created on the Secret Manager:

- `login: admin`
- `password: my_secret_password`

```yaml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
```yaml
Create a `externalsecret.yaml` file with this content:
```yaml

```

> [!info]
> Only `ExternalSecret` are supported yet.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c'est a dire ?


> [!info]
> Only `ExternalSecret` are supported yet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Apply the resource in your cluster:
kubectl apply -f externalsecret.yaml


#### Deploy your application

The secret should be created and available in kubernetes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The secret should be created and available in kubernetes.
The secret should be created and available in the Kubernetes cluster.
Check:
$ kubectl get secret -n default
NAME TYPE DATA AGE
token-secret Opaque 1 17h
creds-secret Opaque 1 9m4s

@Y0Coss Y0Coss added the Edition needed Content needs edition from the author before Quality Check by the Guides Team can start/resume label Dec 2, 2025
@Y0Coss Y0Coss added the Guide creation The Pull Request contains at least 1 new guide (meta.yaml and index edition needed) label Dec 16, 2025
---

> [!primary]
> Secret Manager is currently in beta phase. This guide can be updated in the future with the advances of our teams in charge of this product.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Secret Manager is currently in beta phase. This guide can be updated in the future with the advances of our teams in charge of this product.
> Secret Manager is currently in Beta phase. This guide can be updated in the future with the advancements made by our teams in charge of this product.


### Setup the Secret Manager

To allow access to the Secret Manager you will need to have a `token`, and the `region` and `okms-id` of your Secret Manager.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To allow access to the Secret Manager you will need to have a `token`, and the `region` and `okms-id` of your Secret Manager.
To allow access to the Secret Manager you will need to have a `token`, the `region` and `okms-id` of your Secret Manager.

--set installCRDs=true
```

Check ESO is running :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Check ESO is running :
Check ESO is running:

>> ```
>>
> CLI
>> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values) :
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values) :
>> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values):

>> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values) :
>>
>> ```bash
>> ovhcloud iam user {user} token create --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
>> ovhcloud iam user {user} token create --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
>> ovhcloud iam user token create {user} --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"

>> PAT can also created with the [OVHcloud CLI](https://github.com/ovh/ovhcloud-cli) and the command (fill with your values):
>>
>> ```bash
>> ovhcloud iam user token create {user} --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or you can create the token AND save it in an environment variable

PAT_TOKEN=$(ovhcloud iam user token create {user} --name pat-secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx --description "PAT secret manager for domain secretmanager-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx" -j  | jq .details.token |  tr -d '"') ; echo $PAT_TOKEN

Start by encoding your `user_pat` is base64 so it can be stored in a kubernetes secret.

```bash
$ echo -n "<token>" | base64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you saved the token in an env variable (c.f my 1st comment today), you can directly do:

PAT_TOKEN_B64=$(echo -n $PAT_TOKEN | base64) ; echo $PAT_TOKEN_B64

ZXlKaG...wVkFn
```

Then create a `secret.yaml`:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, easily, create the Secret from the created environment variable (see my comment number 1 and 2 of this review):

$ kubectl create secret generic ovhcloud-vault-token -n external-secrets --from-literal=token=$PAT_TOKEN_B64

secret/ovhcloud-vault-token created

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Edition needed Content needs edition from the author before Quality Check by the Guides Team can start/resume Guide creation The Pull Request contains at least 1 new guide (meta.yaml and index edition needed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants