当前位置:网站首页>标签 & 标签选择器 & 注解
标签 & 标签选择器 & 注解
2022-07-18 08:06:00 【喝醉酒的小白】
标签
标签(Label)是将资源进行分类的标识符,资源标签其实就是一个键值型(key/values)数据。标签旨在指定对象(如Pod等)辨识性的属性,这些属性仅对用户存在特定的意义,对Kubernetes集群来说并不直接表达核心系统语义。标签可以在对象创建时附加其上,并能够在创建后的任意时间进行添加和修改。一个对象可以拥有多个标签,一个标签也可以附加于多个对象(通常是同一类对象)之上,如图所示。
k get node,ns --show-labels
kd get svc,ep,pod --show-labels
kd describe svc|grep Labels
标签选择器
标签选择器(Selector)全称为“Label Selector”,它是一种根据Label来过滤符合条件的资源对象的机制。例如,将附有标签“role: backend”的所有Pod对象挑选出来归为一组就是标签选择器的一种应用,如图所示。用户通常使用标签对资源对象进行分类,而后使用标签选择器挑选出它们,例如将其创建为某Service的端点。
kd describe deployment|grep Selector
注解
Annotation(注解)是另一种附加在对象之上的键值类型的数据,但它拥有更大的数据容量。Annotation常用于将各种非标识型元数据(metadata)附加到对象上,但它不能用于标识和选择对象,通常也不会被Kubernetes直接使用,其主要目的是方便工具或用户的阅读及查找等。
kd describe svc|grep Annotations
kd describe deployment|grep Annotations
边栏推荐
- mysql8安装
- 枚举转化Map与List
- [cloud native] - migrate the docker container from Oracle to MySQL
- Codeforces D. Two Divisors (数论,线性筛)
- Low-Power Bloom Filter Architecture for Deep Packet Inspection论文总结
- 2022_ SummerBlog_ 011
- I've opened the express station for five years, but I haven't returned it yet
- Flask快速入门
- Redis source code learning (32), dictionary learning, dict.c (2)
- 2022_ SummerBlog_ 009
猜你喜欢
[cloud native] - migrate the docker container from Oracle to MySQL
新版微信文件夹路径FileStorage变成了MsgAttach
将Android进行到底之Kotlin语言基础(四)
Proxmox ve 7.2 change login banner
Websocket chat small example (with source code)
Learning from Noisy Anchors for One-stage Object Detection
Hybridclr -- epoch-making unity native C # hot update technology
后渗透操作
C语言程序的编译(预处理)概述 —— 上
01背包问题 416.分割等和子集-494.目标和
随机推荐
Codeforces D.Constructing the Array(优先队列)
Low power bloom filter architecture for deep packet inspection paper summary
Opérations de base pour MySQL - CRUD
ABC-At Least One-(预处理+树状数组)
基于51单片机的电子秤设计
关于 EditText输入监听如何判断输入结束
Cmake core use (can solve all difficulties)
SAIC Roewe rx5max's safety performance surpasses that of the joint venture brand and becomes a real No1
Low-Power Bloom Filter Architecture for Deep Packet Inspection论文总结
Arthas 快速入门
PTA 7-1 玩转二叉树
Kotlin language foundation for Android to the end (III)
[cloud native] - migrate the docker container from Oracle to MySQL
树和二叉树(学习笔记)
Kotlin language foundation for Android to the end (4)
SSRF(服务器端请求伪造)--原理&绕过&防御
Uploads labs in-depth study
Controls that follow the movement of actors in ue4/5: take the blood bar on NPC's head as an example
01背包问题 416.分割等和子集-494.目标和
Websocket chat small example (with source code)