How to fix this issue "no suitable node (scheduling constraints not satisfied on 1 node)" in docker swarm while deploying registry?

Viewed 30256

I have a docker swarm in a virtual machine with 2 core 4GB ram Centos.

In the swarm when I deploy docker private registry (registry 2.6.4) it shows service status as pending forever. I used docker service ps <<registry_name>>

And when i inspect using docker inspect <<task_id>> in message I got this "no suitable node (scheduling constraints not satisfied on 1 node)".

I tried service restart and redeployment.

How to fix this?

2 Answers

I had a similar problem while deploying service, check what is the availability of node, by docker node ls and check if nodes are not set to drain and update to active using docker node update --availability active <node-id>

which will allow swarm to run containers on the nodes for that service.

Related