What are Labels in Kubernetes

Find out what micro tutorials are.


In this micro tutorial we will cover in simple easy to remember terms, what a Kubernetes label is.

I’d Like You to Know

These MicroTuts are meant to inspire further learning around the topics they cover.

My hope is that they can be used as reference to more easily gain additional knowledge. 

If you would like some MicroTut’s created for a subject you are interested in then please use the form at the bottom of this page.

Kubernetes Labels

Labels can be used for different object in Kubernetes.

Adding a label to a pod for example will allow you to search and filter for a specific pod. You can perform action on pods by referencing the labels to. E.g. deleting pods with label that have a specific key and value.

Labels are created in an object.

"metadata": {
  "labels": {
    "key1" : "value1",
    "key2" : "value2"

Each key should be unique in an individual object.

Official Documentation

Checkout Kubernetes Labels documentation.