gpt4 book ai didi

kubernetes - K8s : app. kubernetes.io 实例标签用途

转载 作者:行者123 更新时间:2023-12-05 02:07:57 25 4
gpt4 key购买 nike

这些是推荐的标签:

app.kubernetes.io/name
app.kubernetes.io/instance
app.kubernetes.io/version
app.kubernetes.io/component
app.kubernetes.io/part-of
app.kubernetes.io/managed-by

我不太明白 app.kubernetes.io/instance 有什么用。

你能提供任何有用的例子吗?

最佳答案

一个通用应用名称可以有多个实例

假设一个应用程序使用 nginx 来提供不同类型的内容,那么每种类型的 nginx 都可以独立扩展:

app.kubernetes.io/name: nginx

app.kubernetes.io/instance: static-01

app.kubernetes.io/instance: img-02

app.kubernetes.io/instance: dynamic-05

不过它们只是建议,因此您可以根据需要使用它们。在小型集群中,您可能不需要使 nameinstance 不同。

参见 Applications And Instances Of Applications

An application can be installed one or more times into a Kubernetes cluster and, in some cases, the same namespace. For example, wordpress can be installed more than once where different websites are different installations of wordpress.

The name of an application and the instance name are recorded separately. For example, WordPress has a app.kubernetes.io/name of wordpress while it has an instance name, represented as app.kubernetes.io/instance with a value of wordpress-abcxzy. This enables the application and instance of the application to be identifiable. Every instance of an application must have a unique name.

关于kubernetes - K8s : app. kubernetes.io 实例标签用途,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61394888/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com