= The command docker service create --network --secure will not ensure that overlay traffic between service tasks is encrypted. This is because the --secure option is not a valid option for the docker service create command1. To ensure that overlay traffic between service tasks is encrypted, you need to use the --opt encrypted option when creating the overlay network with the docker network create command2. For example, to create an encrypted overlay network named my-net, you can use the following command:
Then, you can use the --network my-net option when creating the service with the docker service create command3. For example, to create a service named my-service using the nginx image and the my-net network, you can use the following command:
docker service create --name my-service --network my-net nginx
docker service create | Docker Docs
Use overlay networks | Docker Docs
Create a service | Docker Docs
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit