Fix Docker, Kubernetes and services connection errors

What the remote server needs, and what to do when Duo22 can't use Docker, kubectl or systemctl on a host.

Docker, Kubernetes and Services work over an SSH host you can already connect to. Duo22 installs nothing on the server: it runs the commands the host already has. Most errors come from the command missing or your SSH user lacking permission. After fixing the host, reconnect and open the tab again so Duo22 checks again.

Docker

Duo22 tries docker, then passwordless sudo docker, then podman.

  • “Docker is installed, but this user isn’t allowed to use it.” Add your user to the docker group with sudo usermod -aG docker $USER, or allow passwordless sudo for docker, then reconnect.
  • “Docker isn’t installed on this host (or isn’t on the PATH for SSH sessions).” Install Docker, or make sure its directory is on the PATH for SSH sessions.
  • “Docker is installed, but its daemon isn’t running.” Start the Docker service on the host.
  • Stack buttons are greyed out with “Needs docker compose”. Install the Docker Compose plugin on the host. Until then, manage the stack’s containers one at a time.
  • A pull from a private registry fails. Run docker login on the host: the pull runs there, not on your computer.

See Manage Docker containers over SSH for using the Docker tab.

Kubernetes

Duo22 tries kubectl, k3s kubectl and microk8s kubectl, each without and then with passwordless sudo.

  • “kubectl isn’t installed on this host (or isn’t on the PATH for SSH sessions).” Install kubectl, or make sure it’s on the PATH for SSH sessions. MicroK8s from a snap lives in /snap/bin, which may not be on the PATH for SSH sessions.
  • “kubectl is installed, but this user can’t read the cluster’s kubeconfig.” On k3s, start the server with --write-kubeconfig-mode 644, or copy /etc/rancher/k3s/k3s.yaml to ~/.kube/config and chown it to your user (or allow passwordless sudo), then reconnect.
  • “MicroK8s is installed, but this user isn’t allowed to use it.” Run sudo usermod -aG microk8s $USER, or allow passwordless sudo, then reconnect.
  • “kubectl is installed, but it has no cluster to talk to.” Your user has no kubeconfig on the host (~/.kube/config), or the cluster isn’t running.
  • “kubectl reached the cluster, but this user’s credentials aren’t allowed to use it (RBAC).” Your Kubernetes user lacks permission. Ask your cluster admin for the right role.

See Manage Kubernetes through an SSH host.

Services (systemd)

  • “This host doesn’t seem to use systemd (systemctl isn’t there, or isn’t on the PATH for SSH sessions).” The services pane only works on hosts that run systemd.
  • The pane’s header says read only. Changing services needs root. Sign in as root, or allow your user passwordless sudo, then reconnect.

See Manage systemd services.

About sudo

Duo22 only uses sudo when it works without a password. It never types your password into sudo. If your sudo setup asks for a password, Duo22 treats sudo as unavailable.

Host stats

The stats bar shows No stats on hosts that aren’t Linux, because it reads Linux’s /proc. This is expected. See Host stats and the Health page.

Still stuck? Check the FAQ, or browse thehelp centre.