multiverse-of-multicluster-madness

Metadata Guide

A crucial part of scale out architecture is labeling and tagging your assets - this gives you atomic and ensemble based matching of your resources. There are going to be a lot of labels/tags that are going to be applied to your objects and every organization’s set of labels looks different - but there are some common attributes or features that you’ll find below that could jump start your own efforts.

Common Labels

There are some common labels that are considered to be baseline best practices.

Key Description Example Type
app.kubernetes.io/name The name of the application mysql string
app.kubernetes.io/instance A unique name identifying the instance of an application mysql-abcxzy string
app.kubernetes.io/version The current version of the application (e.g., a SemVer 1.0, revision hash, etc.) 5.7.21 string
app.kubernetes.io/component The component within the architecture database string
app.kubernetes.io/part-of The name of a higher level application this one is part of wordpress string
app.kubernetes.io/managed-by The tool being used to manage the operation of an application helm string

You can find these listed here in great detail: https://kubernetes.io/docs/concepts/overview/working-with-objects/common-labels/

Namespacing Metadata

Metadata can be namespaced via domain pathing, eg there are some well-known labels, annotations, and taints that have keys prefixed by kubernetes.io, app.kubernetes.io, etc. You can of course also namespace your own labels with a domain path prefix, eg example.com/cost-center.

Well-known Labels, Annotations, and Taints

You can find the well-known metadata references here: https://kubernetes.io/docs/reference/labels-annotations-taints/


General Labels

There are some labels that aren’t necessarily meant for organizing workloads as much as they are for attribution to business signals. This could be for billing, environmental notation, metric selectors, policy actuation, so on.


Infrastructure Specific Labels

General

AWS

Azure

GCP

VMWare

Bare Metal


Application-centric Labels


Auto-generated Labels

Often you’ll find some auto-generated or auto-applied labels on certain objects that the platform controllers set automatically - these are handy to use for targeting and selecting other objects, knowing the portability is met across clusters.

On Nodes

On Machines