acd-admin
Page not available in that version
The current page acd-admin doesn't exist in version 1.6.2 of the documentation for this product.
Synopsis
acd-admin list
acd-admin status [<target>]
acd-admin logs <target> [-f] [-n <lines>] [-p] [-c <container>] [--since <time>] [--until <time>]
acd-admin restart <target> [--timeout <duration> | --no-wait | --node <node>]
acd-admin shell <target> [--pod <pod> | --node <node>] [-c <container>]
acd-admin exec <target> [--pod <pod> | --node <node> | --all] [-c <container>] -- <command> [<argument>...]
acd-admin cordon <node>
acd-admin uncordon <node>
acd-admin drain <node> [--force]
acd-admin [<command>] -h | --help
acd-admin -V | --version
Description
acd-admin manages the running cluster by admin target: a short name such as manager, kafka or postgresql. It works out which Kubernetes objects, labels and namespaces a target means, and handles each kind the safe way for it. acd-admin list prints the valid names. A name that is not a target is an error that lists them.
It is installed on every machine at /usr/local/bin/acd-admin. Run it as root on a server, after deploy has installed the cluster. Anywhere else it stops at once with:
Error: run acd-admin on a server node as root, or set KUBECONFIG.
Before deploy has installed the cdn-platform release, it stops with:
Error: the cdn-platform chart is not installed; run deploy first.
Each command runs in a short-lived pod in the acd-system namespace, started from the release that is installed, so the tool always matches it. The pod is removed when the command ends, Ctrl-C included. A pod left behind by a dropped session can be removed with kubectl delete pod -n acd-system <pod>.
restart, cordon, uncordon, drain, and opening a shell or exec session each record a Kubernetes Event on the affected object, with the command line, the user who logged in to the server and its hostname. acd-admin status <target> shows them. Because the command line is recorded, never pass a password or other secret as an argument.
Bash completion for commands, options, targets and nodes is installed on every machine.
Commands
list
acd-admin list
Prints every admin target and its kind, including targets with no pods.
TARGET KIND
status
acd-admin status [<target>]
With no target, prints one line per target, then one line per node.
| Column | Contents |
|---|---|
TARGET | The admin target |
READY | Ready pods out of desired pods |
RESTARTS/1H | Containers whose last restart was in the past hour. A container that restarted several times counts once, so this is a lower bound. |
HEALTH | The first that applies: down (pods are desired but none is Ready), rolling (a new version is rolling out), degraded (some desired pods are not Ready), ok |
CHANGED | Time since the target last changed |
NODE | The node |
READY | Whether the node is Ready |
ROLES | The node’s roles |
SCHEDULING | Whether the node is cordoned or drained |
DIRECTOR | Whether the node runs the director. The director in Kubernetes is not supported in this release. |
With a target, prints one line per pod (POD, NODE, READY, RESTARTS, AGE, LAST TERMINATION). For kafka it adds the Strimzi conditions, and for postgresql the CloudNativePG phase and the current primary. It ends with the target’s recent Warning events and the audit Events of acd-admin itself (WHEN, KIND, OBJECT, REASON, MESSAGE).
The output is for reading; there is no machine-readable format.
logs
acd-admin logs <target> [-f] [-n <lines>] [-p] [-c <container>] [--since <time>] [--until <time>]
Shows the logs of every pod and container of the target, init containers excluded. Each line starts with its pod, and its container when the pod has more than one: <pod>[/<container>] <line>. A bounded window is merged in time order across pods.
| Option | Effect |
|---|---|
-f, --follow | Keeps printing new lines, including from pods created meanwhile, such as during a restart. |
-n, --lines <lines> | Shows only the last <lines> lines of each pod. Default: all. Not with --until. |
-p, --previous | Shows the previous instance of each container, such as one that crashed. |
-c, --container <container> | Shows only this container. |
--since <time> | Shows lines from this time on. |
--until <time> | Shows lines up to this time. Not with --follow. |
<time> is a duration before now, such as 2m, 1h 30m or '10m ago', or an RFC 3339 timestamp in UTC, such as 2026-10-16T12:00:00Z. Only the logs the cluster still holds are available: those of the current and the previous instance of each container.
restart
acd-admin restart <target> [--timeout <duration> | --no-wait | --node <node>]
Restarts every pod of the target, the safe way for its kind: a rolling restart for ordinary workloads, a broker-by-broker rolling update through Strimzi for kafka, and for postgresql a CloudNativePG restart of the replicas first, then a switchover of the primary.
By default it waits, showing progress such as 2/3 pods updated, until the restart is complete. Ctrl-C stops the waiting only: the restart carries on, and acd-admin says so. A target with nothing running is left alone, and acd-admin says so.
| Option | Effect |
|---|---|
--timeout <duration> | How long to wait, such as 90s or 10m, before exiting non-zero and reporting what is stuck. The restart carries on, and nothing is rolled back. Default: 5m for a Deployment, 10m for any other kind. |
--no-wait | Starts the restart and returns at once. Not with --timeout. |
--node <node> | Restarts only the target’s pod on this node, by deleting it for its controller to recreate. Refused for kafka and postgresql. Not with --timeout or --no-wait. |
shell
acd-admin shell <target> [--pod <pod> | --node <node>] [-c <container>]
Opens an interactive session in one Ready pod of the target:
| Target | Session |
|---|---|
postgresql | psql on the current primary |
kafka | A shell on a broker, with the Kafka command line tools on the PATH and the bootstrap address set |
| any other | /bin/sh |
| Option | Effect |
|---|---|
--pod <pod> | Uses this pod. |
--node <node> | Uses the target’s pod on this node. |
-c, --container <container> | Uses this container. |
Without --pod or --node, it uses the first Ready pod, or the primary for postgresql. If no pod of the target is Ready, it refuses and lists the pods.
exec
acd-admin exec <target> [--pod <pod> | --node <node> | --all] [-c <container>] -- <command> [<argument>...]
Runs a command, exactly as given after --, in one pod of the target, chosen as for shell. It gets a terminal only when standard input is one, so output can be redirected or piped.
| Option | Effect |
|---|---|
--pod <pod> | Runs in this pod. |
--node <node> | Runs in the target’s pod on this node. |
--all | Runs in every pod of the target, one after another, with no terminal and no standard input. Each line starts with its pod. Ends with a list of the pods where the command failed, and exits non-zero if any did. |
-c, --container <container> | Runs in this container. |
cordon
acd-admin cordon <node>
Stops new pods from being scheduled on the node. Pods already there keep running.
uncordon
acd-admin uncordon <node>
Returns a cordoned or drained node to service.
drain
acd-admin drain <node> [--force]
Takes the node out of service for maintenance. It cordons the node, and moves its workloads to other nodes respecting their disruption budgets. Metrics, log shipping, storage and ingress forwarding keep running on the node, so it can still be observed. While it waits, it reports what it is waiting for, such as a storage volume’s last healthy replica. It never moves the acd-admin pod doing the drain.
A drained node stays drained through later deploy runs, until acd-admin uncordon.
| Option | Effect |
|---|---|
--force | Drains even when it would remove the last Ready director. The director in Kubernetes is not supported in this release. |
Options
Every command accepts:
| Option | Effect |
|---|---|
-h, --help | Prints the help for acd-admin, or for the command, and exits. |
acd-admin alone also accepts:
| Option | Effect |
|---|---|
-V, --version | Prints the version and exits. |
Environment
| Variable | Effect |
|---|---|
KUBECONFIG | The cluster credentials to use. Default: /etc/rancher/k3s/k3s.yaml. |
Exit Status
| Status | Meaning |
|---|---|
0 | The command succeeded |
1 | The command failed, including a restart that timed out, an exec --all that failed in any pod, and a refused drain |
2 | Invalid command line, such as an unknown option or two options that cannot be combined |
130 | Interrupted with Ctrl-C. An interrupted restart carries on in the cluster. |
Examples
See which targets exist and how they are doing:
acd-admin list
acd-admin status
acd-admin status postgresql
Follow the manager’s logs from ten minutes ago:
acd-admin logs manager -f --since '10m ago'
See why a container crashed:
acd-admin logs manager -p
Restart Kafka, allowing up to 20 minutes:
acd-admin restart kafka --timeout 20m
Restart only the manager’s pod on one node:
acd-admin restart manager --node manager-3
Open psql on the PostgreSQL primary:
acd-admin shell postgresql
Run a command in every Redis pod:
acd-admin exec redis --all -- redis-cli ping
Take a node out of service and return it:
acd-admin drain manager-3
acd-admin uncordon manager-3
See Also
- Operations Guide: day-to-day procedures
- Troubleshooting Guide
deploy: installing, upgrading and reconfiguring the cluster