Basic concepts of Kubernetes (K8s): Label, Replication Controller

Basic concepts of Kubernetes: Label, Replication Controller

One, Label (label)

Label is another core concept in the K8s system. A Label is a key-value pair with key=value, and the key and value are specified by the user. Label can be attached to various resource objects, such as Node, Pod, Service, RC, etc. A resource object can define any number of labels, and the same label can also be added to any number of resource objects. Labels are usually determined when the resource object is defined, or they can be dynamically added or deleted after the object is created.

The multi-dimensional resource grouping management function can be realized by bundling one or more different tags to the specified resource object, so that the management work such as resource allocation, scheduling, configuration, and deployment can be carried out flexibly and conveniently. For example: deploying different versions of applications to different environments.

Some commonly used Label examples are as follows:

  • Version label: "release": "stable"
  • Environmental label: "environment": "dev", "environment": "production"
  • Architecture label: "tier": "frontend", "tier": "backend"
  • Partition label: "partition": "customerA"
  • Quality control label: "track": "daily"

Label is equivalent to a label, which defines a Label for a certain resource object

Guess you like

Origin blog.csdn.net/zhengzaifeidelushang/article/details/113064900