These are recommended labels:
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
I don't quite figure out what app.kubernetes.io/instance is for.
Could you provide any useful examples?
A generic application name can have multiple instances.
Say if an application used nginx to serve different types of content, so each type of nginx can be scaled independantly:
app.kubernetes.io/name: nginx
app.kubernetes.io/instance: static-01
app.kubernetes.io/instance: img-02
app.kubernetes.io/instance: dynamic-05
They are only recommendations though so you can use them how you want. In small scale clusters you might not have a need to make name and instance different.
See 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/nameofwordpresswhile it has an instance name, represented asapp.kubernetes.io/instancewith a value ofwordpress-abcxzy. This enables the application and instance of the application to be identifiable. Every instance of an application must have a unique name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With