Node Labels

key-value pairs used to organize and select subsets of nodes

Labels are defined for the nodes in the node pool. Labels are key-value pairs used to organize and select subsets of nodes in the Kubernetes cluster. For example, in this example configuration:

  • “app” = “web-app”: This label assigns a role of web-app to the nodes. This can be used for identifying or grouping nodes based on their role.
  • “tier” = “frontend”: Another custom label for categorization or filtering. In this case the frontend of the web app.
node_labels = {
    "app"  = "web-app",
    “tier” = "frontend"
},

Labels are crucial for scheduling and management tasks in Kubernetes. They can be used to ensure that certain pods are deployed on specific nodes, or for categorization and resource management purposes.

Using Labels is optional but highly recommended.

Last modified July 21, 2024: update (e2ae86c)