Delete the service running on the swarm (original) (raw)

The remaining steps in the tutorial don't use the helloworld service, so now you can delete the service from the swarm.

  1. If you haven't already, open a terminal and ssh into the machine where you run your manager node. For example, the tutorial uses a machine namedmanager1.
  2. Run docker service rm helloworld to remove the helloworld service.
  3. Run docker service inspect <SERVICE-ID> to verify that the swarm manager removed the service. The CLI returns a message that the service is not found:
  4. Even though the service no longer exists, the task containers take a few seconds to clean up. You can use docker ps on the nodes to verify when the tasks have been removed.

Next, you'll set up a new service and apply a rolling update.

Apply rolling updates