How do I filter docker swarm nodes by label?

妖精的绣舞 提交于 2019-12-05 08:59:16

As I believe you've seen (based on the thumbs up it received), this is a known issue (#27231) with docker swarm.

Simple answer: this doesn't work like you'd think it would, but it looks like they might fix it.

Quoting from the Github issue:

The confusion comes from the fact that we have two set of labels:

Node labels (the ones you've been setting through docker node update) Engine labels (the ones that you set when you start docker daemon with --label) Label filtering in docker node ls is looking at engine labels rather than node labels.

We should probably revert to node label filtering rather than engine filtering

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!