Skip to main content

Swarm secrets

This article refers to Platform v3.1.0. The current Platform version is v3.2.0.

Overview

Swarm secrets are secure objects used to store sensitive data such as passwords, certificates, or keys within a Docker Swarm cluster. They enable safe sharing of confidential information among services without exposing them in the application code or environment variables.

Swarm secrets differ from Docker secrets primarily in their scope and management. While Docker secrets are typically used in standalone Docker environments, Swarm secrets are designed for distributed clusters, providing encrypted storage and controlled access across multiple nodes.

In Docker Compose files, Swarm secrets are defined under the secrets section, allowing services to reference and use them securely. This integration simplifies secret management in multi-service applications deployed on Swarm.

Swarm Secrets Card

In this card, users can view all the Swarm secrets that have been created by the applications deployed within the cluster. It provides a clear overview of each secret, including its name and status.

Users also have the ability to delete secrets directly from this interface. However, it is important to note that only secrets not currently in use by any service can be removed.

warning

Only secrets that are not in use by any service can be deleted. Attempting to remove a secret currently referenced by a service will not be allowed to prevent disruption.

Swarm Secrets Card showing list of secrets with activity status and delete options

Swarm Secrets Card showing list of secrets with activity status and delete options

Features shown in the Swarm Secrets Card include:

  • Display of all Swarm secrets created by deployed applications.
  • Status indicators showing the number of secrets and any errors or pending actions.
  • Ability to delete secrets that are not currently in use.
  • Clear listing of secret names and last activity timestamps.