DCA · Question #9
Which of the following statements is true about secrets?
The correct answer is D. Secrets can be created using standard input (STDIN) and a file. Docker Swarm secrets are immutable and encrypted, and they can be created from either a file or standard input.
Question
Which of the following statements is true about secrets?
Options
- ASecrets can be created from any node in the cluster.
- BSecrets can be modified after they are created.
- CSecret are stored unencrypted on manager nodes.
- DSecrets can be created using standard input (STDIN) and a file.
How the community answered
(57 responses)- A4% (2)
- B4% (2)
- C2% (1)
- D91% (52)
Why each option
Docker Swarm secrets are immutable and encrypted, and they can be created from either a file or standard input.
Secrets can only be created, updated, or removed from a Docker Swarm manager node, not from any node in the cluster.
Docker secrets are immutable once created; they cannot be modified and must be removed and recreated if any changes are needed.
Docker Swarm encrypts secrets both at rest on manager nodes and in transit to worker nodes to protect sensitive information.
Docker Swarm secrets offer flexibility in creation, allowing users to pass secret data via standard input (`docker secret create my_secret -`) or by specifying a file containing the secret (`docker secret create my_secret --file /path/to/secret.txt`).
Concept tested: Docker Swarm secret management
Source: https://docs.docker.com/engine/swarm/secrets/#create-a-secret
Topics
Community Discussion
No community discussion yet for this question.