您的位置 首页 k8s

k8s 标签管理

 

kubectl get pods --show-labels

demo:

kubectl get pods --show-labels -n his

[root@master231 pod]# cat 10-pods-labesl.yaml


apiVersion: v1
kind: Pod
metadata:
  name: baimei-linux86-labels
  # 给Pod资源添加标签
  labels:
    # school: baimei
    school: dashu
    # class: linux86
spec:
  containers:
  - name: web
    image: harbor.baimei.com/baimei-web/nginx:1.25.1-alpine

 

部署

 kubectl apply -f 10-pods-labesl.yaml 

 kubectl get pods --show-labels

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章