nerdexam
Docker

DCA · Question #112

Will this command ensure that overlay traffic between service tasks is encrypted? Solution: docker service create --network --secure

The correct answer is B. No. The docker service create --network --secure command will not encrypt overlay traffic, as --secure is not a valid flag for network encryption at the service level, nor for the docker service create command itself in this context.

Submitted by thandi_sa· Apr 18, 2026Networking

Question

Will this command ensure that overlay traffic between service tasks is encrypted? Solution: docker service create --network --secure

Options

  • AYes
  • BNo

How the community answered

(32 responses)
  • A
    6% (2)
  • B
    94% (30)

Why each option

The `docker service create --network --secure` command will not encrypt overlay traffic, as `--secure` is not a valid flag for network encryption at the service level, nor for the `docker service create` command itself in this context.

AYes

The `--secure` flag is not a valid or recognized option for `docker service create` to enable network encryption.

BNoCorrect

The `docker service create` command does not have a `--secure` flag for enabling network encryption; instead, encryption for overlay networks is configured at the network creation level using `docker network create --opt encrypted`. Services simply attach to an already encrypted network.

Concept tested: Docker Swarm service network encryption

Source: https://docs.docker.com/engine/reference/commandline/service_create/

Topics

#Docker Service#Overlay Network#Network Encryption#Docker Swarm

Community Discussion

No community discussion yet for this question.

Full DCA Practice