> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/rdm/integrations/devops-ci-cd/kubernetes.md).

# Kubernetes

Sync Devolutions Server secrets into Kubernetes with the External Secrets Operator, reference vault entries and push updated passwords back to the server.

Kubernetes integrates with Devolutions Server, a workspace type of Remote Desktop Manager, through the External Secrets Operator, which reads entries from a Devolutions Server vault and creates Kubernetes secrets from them. It does not use a Remote Desktop Manager entry type.

## Prerequisites

* A Devolutions Server instance whose URL is reachable from your Kubernetes cluster. See [Devolutions Server](https://docs.devolutions.net/server).
* A Kubernetes cluster with the [External Secrets Operator](https://external-secrets.io/latest/introduction/overview/) installed.
* A Devolutions Server application identity with the ***View content*** permission on the vault, and the ***View*** and ***View password*** entry permissions on the entries to sync. To use a `PushSecret`, it also needs the ***Edit*** entry permission on the target entry.

## What you can do

* Authenticate to Devolutions Server with an application ID and application secret stored in a Kubernetes secret.
* Reference entries by universally unique identifier (UUID), by name, or by name with a folder path (`/` or `\` as separator).
* Sync Credential entries and Secret entries. The provider maps each credential type to its properties: `username`, `password`, `domain`, `api-id`, `api-key`, `tenant-id`, `client-id`, `client-secret`, `connection-string`, `private-key`, `public-key` and `passphrase`.
* Fetch one property, or extract all the properties of an entry into a Kubernetes secret. The `password` property is returned when no property is specified.
* Push the value of a Kubernetes secret to the password field of an existing Credential entry of the Default or Access Code subtype with a `PushSecret`.

{% hint style="warning" %}
The `find` operation (GetAllSecrets) and Certificate entries are not supported. Custom certificate authority (CA) certificates are not supported yet; use the `SSL_CERT_FILE` environment variable for a self-signed Devolutions Server.
{% endhint %}

## Configure Kubernetes

1. Sign in to the Devolutions Server web interface.
2. Go to Administration – Management – Application identities, click ***Add*** (+) and, in ***Role assignments***, assign a role that includes ***View content*** on the vault, such as ***Vault member***. Give the application identity the entry permissions, for example through its ***User groups***.
3. Save the ***Application ID*** and the ***Application Secret***.
4. Create a Kubernetes secret that contains them:

   ```bash
   kubectl create secret generic dvls-credentials \
     --from-literal=app-id="your-application-id" \
     --from-literal=app-secret="your-application-secret"
   ```
5. In the same namespace as the secret, create a `SecretStore` that points to the Devolutions Server instance:

   ```yaml
   apiVersion: external-secrets.io/v1
   kind: SecretStore
   metadata:
     name: dvls-store
   spec:
     provider:
       dvls:
         serverUrl: 'https://devolutions-server.example.com'
         vault: 'my-vault'
         auth:
           secretRef:
             appId:
               name: dvls-credentials
               key: app-id
             appSecret:
               name: dvls-credentials
               key: app-secret
   ```
6. Set `serverUrl` to the URL of your Devolutions Server instance and `vault` to the name or UUID of the vault to read. If `vault` is omitted, use the `<vault-id>/<entry-id>` format in each secret key.
7. For a `ClusterSecretStore`, specify the `namespace` in the secret references.

## Use Kubernetes

1. In the same namespace, create an `ExternalSecret` that refers to the store with `secretStoreRef`:

   ```yaml
   apiVersion: external-secrets.io/v1
   kind: ExternalSecret
   metadata:
     name: database-credentials
   spec:
     refreshInterval: 1h
     secretStoreRef:
       kind: SecretStore
       name: dvls-store
     target:
       name: database-secret
       creationPolicy: Owner
     data:
       - secretKey: password
         remoteRef:
           key: 'db-credentials'
           property: password
   ```
2. Set `key` to the UUID or the name of the entry, with an optional folder path such as `infrastructure/databases/db-credentials`. Use the UUID when several entries share the same name, or when the name contains `/` or `\`.
3. To sync all the properties of an entry, use `dataFrom` with `extract` instead of `data`.
4. Apply the manifest. The operator creates the Kubernetes secret and refreshes it at the `refreshInterval`.
5. To push a value back, create a `PushSecret` with `remoteKey` set to the name or the UUID of an existing entry of the Default or Access Code subtype.

## Integration level

Kubernetes is an integration level 2 – Moderate support integration. See [Integration levels](https://docs.devolutions.net/resources/integration-levels).

#### See also

* [Application identities](https://docs.devolutions.net/server/web-interface/administration/user-and-security-management/applications-identities)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.devolutions.net/rdm/integrations/devops-ci-cd/kubernetes.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
