OR选择器如何与Kubernetes中的标签一起使用? [英] How can the OR selector be used with labels in Kubernetes?

查看:50
本文介绍了OR选择器如何与Kubernetes中的标签一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OR表达式如何与选择器和标签一起使用?

How the OR expression can be used with selectors and labels?

  selector:
    app: myapp
    tier: frontend

以上内容与标签为app==myapp AND tier=frontend的广告连播相匹配.

The above matches pods where labels app==myapp AND tier=frontend.

但是可以使用OR表达式吗?

But the OR expression can be used?

app==myapp OR tier=frontend?

推荐答案

OR.

您可以尝试基于集合的标签选择器.请参阅以下链接, https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements

You can try the set-based label selector. Refer to the following link, https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#resources-that-support-set-based-requirements

这篇关于OR选择器如何与Kubernetes中的标签一起使用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆