Meta tags:
description= Drain nodes on the swarm;
keywords= tutorial,cluster,management,swarm,service,drain,get,started;
Headings (most frequently used words):
drain, node, on, the, swarm, next, steps, what, can, help, you, with,
Text of the page (most frequently used words):
docker (93), the (55), and (41), swarm (37), node (37), engine (32), driver (31), use (29), with (28), image (25), redis (22), build (21), service (18), availability (17), running (17), manage (17), copying (16), compose (16), drain (15), your (15), logging (14), active (13), for (13), release (13), storage (13), mode (12), how (12), create (12), security (12), images (12), you (11), worker1 (11), faqs (11), notes (11), scout (11), cache (11), settings (10), update (10), manager (10), access (10), container (10), cli (10), usage (10), new (9), state (9), nodes (9), desktop (9), configure (9), network (9), v17 (9), tasks (8), true (8), settimeout (8), false (8), 2000 (8), run (8), from (8), started (8), file (8), troubleshoot (8), extension (8), status (7), task (7), containers (7), management (7), reference (7), deploy (7), support (7), feedback (7), variables (7), content (7), trust (7), v18 (7), daemon (7), set (6), environment (6), start (6), open (6), registry (6), migrate (6), logs (6), quickstart (6), configuration (6), get (6), plugin (6), bake (6), drivers (6), ready (5), inspect (5), hardened (5), setup (5), add (5), account (5), subscription (5), best (5), practices (5), extensions (5), github (5), data (5), builds (5), attestations (5), examples (5), gordon (5), model (5), local (5), plugins (5), all (4), this (4), when (4), see (4), worker2 (4), manager1 (4), name (4), api (4), store (4), change (4), billing (4), platform (4), features (4), integration (4), guides (4), multi (4), marketplace (4), code (4), integrations (4), tos (4), metrics (4), install (4), repository (4), beta (4), networking (4), concepts (4), customize (4), migration (4), overview (4), agent (4), mcp (4), profiles (4), secrets (4), exporters (4), remote (4), thread (4), about (3), routing (3), mesh (3), steps (3), rolling (3), scale (3), can (3), hostname (3), 38ciaotwjuritcdtn9npbnkuz (3), desired (3), minutes (3), current (3), that (3), seconds (3), tutorial (3), verify (3), machine (3), claude (3), docs (3), copy (3), manuals (3), advanced (3), custom (3), roles (3), core (3), sign (3), general (3), insights (3), products (3), information (3), authentication (3), accounts (3), deprecated (3), cloud (3), continuous (3), sdk (3), binaries (3), kubernetes (3), architecture (3), publish (3), share (3), labels (3), source (3), actions (3), azure (3), amazon (3), registries (3), policy (3), using (3), explore (3), optimize (3), export (3), push (3), software (3), tags (3), search (3), hub (3), give (3), windows (3), mac (3), gpu (3), debian (3), ubuntu (3), chart (3), experimental (3), dmr (3), troubleshooting (3), toolkit (3), building (3), services (3), multiple (3), introduction (3), dockerfile (3), buildkit (3), functions (3), contexts (3), log (3), key (3), llms (2), txt (2), page (2), next (2), another (2), during (2), back (2), receive (2), snip (2), pretty (2), updated (2), drained (2), 9bg7cezvedmkgg6c8yzvbhwsd (2), 7h2l8h3q3wqy5f66hlv9ddmi6 (2), shutdown (2), 7q92v0nr1hcgts2amcjyqg3pq (2), its (2), assigned (2), distributed (2), one (2), different (2), now (2), are (2), available (2), named (2), not (2), standalone (2), such (2), workloads (2), maintenance (2), have (2), been (2), markdown (2), getting (2), organization (2), tokens (2), namespace (2), json (2), enable (2), isolation (2), permissions (2), enforce (2), provision (2), mapping (2), user (2), providers (2), domains (2), installer (2), deactivate (2), enterprise (2), two (2), history (2), lifecycle (2), testcontainers (2), backend (2), dashboard (2), test (2), developer (2), tools (2), socket (2), host (2), design (2), metadata (2), arch (2), part (2), process (2), non (2), environments (2), quality (2), view (2), evaluate (2), policies (2), collection (2), artifact (2), types (2), sboms (2), exception (2), vex (2), delete (2), repositories (2), program (2), trusted (2), options (2), automated (2), mirror (2), library (2), builder (2), uninstall (2), releases (2), linux (2), restore (2), wsl (2), containerd (2), capabilities (2), resource (2), volumes (2), rhel (2), fedora (2), permission (2), requirements (2), resources (2), slsa (2), provenance (2), select (2), testing (2), models (2), engines (2), runner (2), templates (2), agents (2), sandboxes (2), server (2), catalog (2), files (2), bridge (2), oci (2), legacy (2), works (2), opentelemetry (2), debugging (2), annotations (2), validation (2), between (2), workflow (2), checks (2), targets (2), builders (2), device (2), v26 (2), protect (2), work (2), certificates (2), format (2), output (2), proxy (2), mounts (2), answers (2), documentation (2), questions (2), helpful (2), assistant (2), copyright, 2013, 2026, inc, rights, reserved, legal, terms, cookies, full, pricing, product, offerings, request, changes, edit, learn, fails, return, maintains, ending, creating, ago, b4hovzed7id8irg1to42egue8, minute, error, assignments, shows, check, had, case, each, may, differently, among, c5uo6kdmzpon37mgj9mwglcfw, replicas, delay, 10s, aren, still, e216jshn25ckzbvmwlnh5jr3g, leader, 1bcef6utixb0l0ca7gxuivsj0, actively, haven, already, terminal, ssh, into, where, example, uses, setting, does, remove, those, created, including, only, affects, ability, schedule, important, sometimes, planned, times, need, prevents, receiving, also, means, stops, launches, replica, earlier, assign, any, ask, home, air, gapped, reporting, admin, console, limitations, eci, enhanced, auto, just, time, group, scim, identity, enforcement, connections, single, microsoft, dev, box, jamf, pro, intune, pkg, msi, activity, users, owners, organizations, company, teams, members, convert, onboard, administration, license, agreement, seats, compare, announcements, recover, factor, personal, submit, tax, exemption, certificate, cycle, invoices, secure, payment, method, navigation, apis, debug, invoke, interacting, mui, principles, guidelines, styling, package, validate, frontend, simple, private, slack, team, collaboration, sysdig, generic, integrating, jenkins, gitlab, circle, devops, pipelines, artifactory, ecr, sonarqube, remediation, compliance, health, scores, evaluation, advisory, database, sources, matching, deep, dive, gui, vulnerability, exceptions, details, exporter, analysis, pulls, limits, archive, analytics, sponsored, verified, publisher, official, autobuilds, tests, link, webhooks, bulk, move, artifacts, immutable, catalogs, optimization, offload, macos, app, damaged, dialog, known, issues, common, topics, diagnose, backup, kernels, virtual, wasm, synchronized, shares, usb, pause, saver, allowlist, vdi, additional, stig, ssdlc, supply, chain, immutability, digests, hardening, glibc, musl, fips, distroless, cves, signing, cis, benchmark, dhi, scan, packages, helm, python, wolfi, alpine, assisted, checklist, malware, scanning, responsibility, scanner, privacy, cases, inference, webui, ide, tool, rest, faq, workspace, credentials, defaults, layers, kits, shell, opencode, kiro, gemini, droid, cursor, copilot, codex, early, e2b, gateway, dynamic, discovery, evals, rag, toolsets, acp, a2a, sharing, coding, provider, applications, production, include, extend, merge, watch, dependent, interpolation, pre, defined, precedence, control, startup, order, hooks, specify, project, development, why, syntax, buildkitd, toml, tar, definitions, sbom, attestation, built, input, git, validating, description, before, jobs, reproducible, summary, inline, blob, backends, garbage, invalidation, definition, overriding, configurations, standard, matrix, expressions, inheritance, base, interface, cdi, stage, context, prior, v19, v20, v23, v24, v25, v27, v28, v29, config, version, volume, authorization, configs, raft, consensus, networks, sensitive, lock, encryption, join, states, public, infrastructure, pki, apply, updates, stack, administer, maintain, client, seccomp, isolate, events, play, sandbox, keys, notary, delegations, automation, apparmor, antivirus, tips, rootless, syslog, splunk, journald, graylog, extended, google, fluentd, etw, cloudwatch, prune, unused, objects, object, read, collect, prometheus, alternative, runtimes, live, ipv6, command, filter, commands, completion, runtime, constraints, processes, automatically, links, overlay, none, macvlan, ipvlan, port, publishing, packet, filtering, firewalls, nftables, iptables, zfs, windowsfilter, vfs, overlayfs, mapper, btrfs, tmpfs, bind, post, installation, centos, raspberry, bit, armhf, generated, based, enabled, considers, viewing, provide, more, relevant, reached, maximum, per, better, answer, remaining, quite, was, org, try, asking, what, help, chat,
Text of the page (random words):
metheus configure remote access for docker daemon read the daemon logs troubleshooting the docker daemon manage resources docker contexts docker object labels prune unused docker objects logs and metrics configure logging drivers customize log driver output logging drivers amazon cloudwatch logs logging driver etw logging driver fluentd logging driver google cloud logging driver graylog extended format logging driver journald logging driver json file logging driver local file logging driver splunk logging driver syslog logging driver use a logging driver plugin use docker logs with remote logging drivers security rootless mode tips troubleshooting antivirus software and docker apparmor security profiles for docker content trust in docker automation with content trust delegations for content trust deploy notary server with compose manage keys for content trust play in a content trust sandbox docker security non events isolate containers with a user namespace protect the docker daemon socket seccomp security profiles for docker verify repository client with certificates swarm mode administer and maintain a swarm of docker engines deploy a stack to a swarm deploy services to a swarm getting started with swarm mode create a swarm add nodes to the swarm deploy a service to the swarm inspect a service on the swarm scale the service in the swarm delete the service running on the swarm apply rolling updates to a service drain a node on the swarm how swarm works how nodes work how services work manage swarm security with public key infrastructure pki swarm task states join nodes to a swarm lock your swarm to protect its encryption key manage nodes in a swarm manage sensitive data with docker secrets manage swarm service networks raft consensus in swarm mode run docker engine in swarm mode store configuration data using docker configs swarm mode key concepts use swarm mode routing mesh deprecated features docker engine plugins access authorization plugin docker log driver plugins docker network driver plugins docker plugin api docker volume plugins plugin config version 1 of plugin v2 use docker engine plugins release notes engine v29 engine v28 engine v27 engine v26 1 engine v26 0 engine v25 0 engine v24 0 engine v23 0 engine v20 10 engine v19 03 engine v18 09 engine v18 06 engine v18 05 engine v18 04 engine v18 03 engine v18 02 engine v18 01 engine v17 12 engine v17 11 engine v17 10 engine v17 09 engine v17 07 engine v17 06 engine v17 05 engine v17 04 engine v17 03 prior releases docker build core concepts docker build overview dockerfile overview build context build checks building multi stage variables secrets multi platform export binaries container device interface cdi best practices base images builders build drivers docker container driver docker driver kubernetes driver remote driver manage builders bake introduction targets inheritance variables expressions functions matrix targets contexts bake file reference bake standard library functions building with bake from a compose file overriding configurations remote bake file definition cache build cache invalidation build garbage collection cache storage backends amazon s3 cache azure blob storage cache github actions cache inline cache local cache registry cache optimize cache usage in builds ci github actions annotations attestations build checks build secrets build summary buildkit configuration cache management copy image between registries export to docker github builder new architecture build workflow bake workflow local registry multi platform image named contexts push to multiple registries reproducible builds share image between jobs tags and labels test before push update docker hub description validating builds experimental introduction usage image validation git validation templates examples testing debugging input reference built in functions metadata annotations build attestations image attestation storage provenance attestations sbom attestations slsa definitions exporters image and registry exporters local and tar exporters oci and docker exporters buildkit buildkitd toml configure buildkit custom dockerfile syntax dockerfile release notes debugging opentelemetry support build release notes docker compose introduction to compose how compose works why use compose history and development install plugin standalone legacy uninstall quickstart how tos specify a project name use lifecycle hooks use service profiles control startup order use environment variables set environment variables environment variables precedence pre defined environment variables interpolation best practices build dependent images use compose watch secrets in compose networking use multiple compose files merge extend include enable gpu support use compose in production oci artifact applications use provider services compose bridge usage customize use model runner compose sdk new trust model for compose files support and feedback faqs give feedback release notes testcontainers docker agent experimental model providers local models building a coding agent best practices sharing agents integrations a2a acp mcp reference configuration file toolsets cli examples rag evals ai overview mcp catalog and toolkit beta get started catalog profiles toolkit ui use with cli dynamic discovery gateway hub mcp server faqs e2b sandboxes docker sandboxes early access get started usage agents claude code codex copilot cursor droid gemini kiro opencode docker agent shell customize templates kits examples build an agent architecture security model isolation layers defaults credentials policies workspace trust troubleshooting faq model runner get started with dmr dmr rest api configuration options dmr examples ide and tool integrations open webui integration inference engines gordon beta use cases concepts capabilities data privacy how to guides docker desktop cli permissions configure tools ai and docker compose use ai models in compose products docker hardened images new quickstart features explore hardened images build process image types scanner integrations image testing responsibility overview malware scanning feedback migration migration checklist ai assisted migration experimental migrate from alpine or debian migrate from ubuntu migrate from wolfi migration examples go python node js how tos search and evaluate mirror a repository customize an image or chart create and build an image use an image use a helm chart use hardened packages verify an image or chart scan an image enforce image usage use the cli use dhi select enterprise core concepts attestations cis benchmark code signing cves distroless images fips glibc and musl hardening image digests image provenance immutability sboms slsa software supply chain security ssdlc stig vex troubleshoot additional resources docker desktop setup install mac mac permission requirements windows windows permission requirements linux ubuntu debian fedora arch rhel vm or vdi environments sign in allowlist explore docker desktop containers images volumes builds kubernetes logs beta resource saver mode pause docker desktop features and capabilities networking how tos gpu support usb ip support synchronized file shares containerd image store wasm workloads beta docker desktop cli virtual machine manager wsl best practices custom kernels use wsl settings and maintenance change settings backup and restore data troubleshoot and support troubleshoot and diagnose common topics known issues macos app damaged dialog faqs general mac windows linux releases give feedback uninstall release notes docker offload quickstart about configure usage optimize usage troubleshoot give feedback docker build cloud setup usage continuous integration optimization builder settings release notes docker hub quickstart library search trusted content catalogs mirror repositories create manage repository information access images tags immutable tags image management software artifacts push images move images bulk migrate images image security insights webhooks automated builds set up link accounts automated repository tests advanced options migrate manage autobuilds troubleshoot trusted content docker official images docker verified publisher program docker sponsored open source program insights and analytics export repositories archive delete settings usage and limits pulls optimize usage troubleshoot release notes docker scout install quickstart explore dashboard docker scout image analysis docker scout metrics exporter image details view manage vulnerability exceptions how tos create an exception using the gui create an exception using the vex docker scout environment variables docker scout sboms use scout with different artifact types deep dive advisory database sources and matching service data collection and storage in docker scout policy evaluation configure policies docker scout health scores evaluate policy compliance in ci remediation with docker scout view docker scout policy status integrations code quality sonarqube container registries amazon ecr artifactory container registry azure container registry continuous integration azure devops pipelines circle ci github actions gitlab ci cd jenkins integrating docker scout with environments generic cli sysdig source code management github team collaboration slack release notes cli release notes platform release notes docker extensions marketplace extensions non marketplace extensions configure a private marketplace settings and feedback extensions sdk the build and publish process quickstart part one build create a simple extension create an advanced frontend extension add a backend to your extension part two publish add labels validate package and release your extension share your extension publish in the marketplace build multi arch extensions architecture metadata security design and ui styling guidelines docker design principles mui best practices developer guides authentication interacting with kubernetes invoke host binaries use the docker socket developer sdk tools test and debug continuous integration ci cli reference extension apis dashboard docker extension backend extension ui api navigation testcontainers cloud deprecated products and features release lifecycle platform support billing add or update a payment method manage your billing information 3d secure authentication invoices and billing history change your billing cycle submit a tax exemption certificate faqs docker accounts accounts create an account manage an account deactivate an account security personal access tokens two factor authentication recover your docker account faqs general container network and vm security announcements subscription compare subscription set up your subscription scale your subscription manage seats change your subscription docker desktop license agreement faqs release notes enterprise administration organization setup create onboard change information convert account manage members teams docker products deactivate faqs company create manage organizations owners users faqs activity logs insights deploy docker desktop msi installer pkg installer ms store deploy with intune deploy with jamf pro microsoft dev box faqs security add and manage domains single sign on setup manage connections troubleshoot faqs general domains enforcement identity providers user management provision scim setup group mapping migrate just in time auto provision troubleshoot enforce sign in configure roles and permissions core roles custom roles hardened docker desktop enhanced container isolation enable eci configure advanced settings limitations faqs settings management use a json file use the admin console desktop settings reporting settings reference air gapped containers registry access management image access management namespace access organization access tokens home manuals docker engine swarm mode getting started with swarm mode drain a node on the swarm drain a node on the swarm copy as markdown open markdown ask docs ai claude open in claude in earlier steps of the tutorial all the nodes have been running with active availability the swarm manager can assign tasks to any active node so up to now all nodes have been available to receive tasks sometimes such as planned maintenance times you need to set a node to drain availability drain availability prevents a node from receiving new tasks from the swarm manager it also means the manager stops tasks running on the node and launches replica tasks on a node with active availability important setting a node to drain does not remove standalone containers from that node such as those created with docker run docker compose up or the docker engine api a node s status including drain only affects the node s ability to schedule swarm service workloads 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 named manager1 verify that all your nodes are actively available s gm copying true settimeout copying false 2000 docker node ls id hostname status availability manager status 1bcef6utixb0l0ca7gxuivsj0 worker2 ready active 38ciaotwjuritcdtn9npbnkuz worker1 ready active e216jshn25ckzbvmwlnh5jr3g manager1 ready active leader if you aren t still running the redis service from the rolling update tutorial start it now s gm copying true settimeout copying false 2000 docker service create replicas 3 name redis update delay 10s redis 7 4 0 c5uo6kdmzpon37mgj9mwglcfw run docker service ps redis to see how the swarm manager assigned the tasks to different nodes s gm copying true settimeout copying false 2000 docker service ps redis name image node desired state current state redis 1 7q92v0nr1hcgts2amcjyqg3pq redis 7 4 0 manager1 running running 26 seconds redis 2 7h2l8h3q3wqy5f66hlv9ddmi6 redis 7 4 0 worker1 running running 26 seconds redis 3 9bg7cezvedmkgg6c8yzvbhwsd redis 7 4 0 worker2 running running 26 seconds in this case the swarm manager distributed one task to each node you may see the tasks distributed differently among the nodes in your environment run docker node update availability drain node id to drain a node that had a task assigned to it s gm copying true settimeout copying false 2000 docker node update availability drain worker1 worker1 inspect the node to check its availability s gm copying true settimeout copying false 2000 docker node inspect pretty worker1 id 38ciaotwjuritcdtn9npbnkuz hostname worker1 status state ready availability drain snip the drained node shows drain for availability run docker service ps redis to see how the swarm manager updated the task assignments for the redis service s gm copying true settimeout copying false 2000 docker service ps redis name image node desired state current state error redis 1 7q92v0nr1hcgts2amcjyqg3pq redis 7 4 0 manager1 running running 4 minutes redis 2 b4hovzed7id8irg1to42egue8 redis 7 4 0 worker2 running running about a minute _ redis 2 7h2l8h3q3wqy5f66hlv9ddmi6 redis 7 4 0 ...
|