Skip to content

kubernetes recommended labels

Angel Campos Muñoz edited this page Aug 20, 2024 · 1 revision

Recommended Labels

In order to take full advantage of using these labels, they should be applied on every resource object.

Key Description
app.kubernetes.io/name The name of the application
app.kubernetes.io/instance A unique name identifying the instance of an application
app.kubernetes.io/version The current version of the application
app.kubernetes.io/component The component within the architecture database
app.kubernetes.io/part-of The name of a higher level application this one is part of
app.kubernetes.io/managed-by The tool being used to manage the operation of an application

Example:

apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    app.kubernetes.io/component: database
    app.kubernetes.io/instance: mysql-abcxyz
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: mysql
    app.kubernetes.io/part-of: wordpress
    app.kubernetes.io/version: "5.7.21"
Clone this wiki locally