当前位置: 首页 > news >正文

做问卷调查赚钱的网站会诈骗不电商大数据查询平台免费

做问卷调查赚钱的网站会诈骗不,电商大数据查询平台免费,wordpress 自定义文章排序,凡客app哪去了kubernetes调度——污点Taint和容忍Toleration 一、通过节点属性调度1、节点名称2、节点标签2.1 查看节点标签2.2 添加标签2.3 修改标签2.4 删除标签2.5 通过节点标签进行调度 二、污点Taint和容忍Toleration1、污点Taint1.1 查看Master节点的污点1.2 添加污点1.3 删除污点 2、…

kubernetes调度——污点Taint和容忍Toleration

  • 一、通过节点属性调度
    • 1、节点名称
    • 2、节点标签
      • 2.1 查看节点标签
      • 2.2 添加标签
      • 2.3 修改标签
      • 2.4 删除标签
      • 2.5 通过节点标签进行调度
  • 二、污点Taint和容忍Toleration
    • 1、污点Taint
      • 1.1 查看Master节点的污点
      • 1.2 添加污点
      • 1.3 删除污点
    • 2、容忍Toleration

一、通过节点属性调度

1、节点名称

[root@k8s-master ~]# kubectl get nodes
NAME                   STATUS   ROLES           AGE    VERSION
k8s-master.linux.com   Ready    control-plane   127d   v1.29.1
k8s-node01.linux.com   Ready    <none>          127d   v1.29.1
k8s-node02.linux.com   Ready    <none>          127d   v1.29.1
apiVersion: apps/v1
kind: Deployment
metadata:name: test1
spec:replicas: 2selector:matchLabels:app: test1template:metadata:labels:app: test1spec:nodeName: k8s-node02.linux.com					// 指定工作节点名称containers:- name: test1image: centos:7imagePullPolicy: IfNotPresentcommand:- sleep- "3600"
[root@k8s-master schedulerTest]# kubectl create -f test1.yaml 
deployment.apps/test1 created
[root@k8s-master schedulerTest]# 
[root@k8s-master schedulerTest]# kubectl get pod -o wide
NAME                         READY   STATUS                   RESTARTS   AGE   IP              NODE                   NOMINATED NODE   READINESS GATES
test1-d69854cd5-jgpvm        1/1     Running                  0          7s    10.88.242.139   k8s-node02.linux.com   <none>           <none>
test1-d69854cd5-tzx6l        1/1     Running                  0          7s    10.88.242.138   k8s-node02.linux.com   <none>           <none>

2、节点标签

2.1 查看节点标签

[root@k8s-master schedulerTest]# kubectl get nodes --show-labels 
NAME                   STATUS   ROLES           AGE    VERSION   LABELS
k8s-master.linux.com   Ready    control-plane   127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-master.linux.com,kubernetes.io/os=linux,node-role.kubernetes.io/control-plane=,node.kubernetes.io/exclude-from-external-load-balancers=
k8s-node01.linux.com   Ready    <none>          127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node01.linux.com,kubernetes.io/os=linux
k8s-node02.linux.com   Ready    <none>          127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node02.linux.com,kubernetes.io/os=linux

2.2 添加标签

[root@k8s-master schedulerTest]# kubectl label node k8s-node01.linux.com disk=ssd 
node/k8s-node01.linux.com labeled
[root@k8s-master schedulerTest]# kubectl get nodes --show-labels
NAME                   STATUS   ROLES           AGE    VERSION   LABELS
k8s-master.linux.com   Ready    control-plane   127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-master.linux.com,kubernetes.io/os=linux,node-role.kubernetes.io/control-plane=,node.kubernetes.io/exclude-from-external-load-balancers=
k8s-node01.linux.com   Ready    <none>          127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,disk=ssd,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node01.linux.com,kubernetes.io/os=linux
k8s-node02.linux.com   Ready    <none>          127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node02.linux.com,kubernetes.io/os=linux

2.3 修改标签

[root@k8s-master schedulerTest]# kubectl label node k8s-node01.linux.com disk=full --overwrite 
node/k8s-node01.linux.com labeled
[root@k8s-master schedulerTest]# kubectl get node --show-labels
NAME                   STATUS   ROLES           AGE    VERSION   LABELS
k8s-master.linux.com   Ready    control-plane   127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-master.linux.com,kubernetes.io/os=linux,node-role.kubernetes.io/control-plane=,node.kubernetes.io/exclude-from-external-load-balancers=
k8s-node01.linux.com   Ready    <none>          127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,disk=full,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node01.linux.com,kubernetes.io/os=linux
k8s-node02.linux.com   Ready    <none>          127d   v1.29.1   beta.kubernetes.io/arch=amd64,beta.kubernetes.io/os=linux,kubernetes.io/arch=amd64,kubernetes.io/hostname=k8s-node02.linux.com,kubernetes.io/os=linux
[root@k8s-master schedulerTest]# 

2.4 删除标签

[root@k8s-master schedulerTest]# kubectl label node k8s-node01.linux.com disk-
node/k8s-node01.linux.com unlabeled

2.5 通过节点标签进行调度

apiVersion: apps/v1
kind: Deployment
metadata:name: test2
spec:replicas: 2selector:matchLabels:app: test2template:metadata:labels:app: test2spec:nodeSelector:								// 节点标签 ram: highercontainers:- name: test2image: centos:7imagePullPolicy: IfNotPresentcommand:- sleep- "3600"

二、污点Taint和容忍Toleration

污点、容忍配合使用,避免pod被分配不合适的机器

1、污点Taint

污点,本质上就是个key-value

1.1 查看Master节点的污点

[root@k8s-master schedulerTest]# kubectl describe node k8s-master.linux.com | grep -i taint
Taints:             node-role.kubernetes.io/control-plane:NoSchedule

1.2 添加污点

格式:# kubectl taint node <节点名称> key=value:{NoSchedule|NoExecute|PreferNoSchedule}

污点策略:

  • NoSchedule
    新建的POD不会再向该节点调度
    已经运行在该节点的POD不会受影响

  • NoExecute
    新建的POD不会再向该节点调度
    已经运行在该节点的POD同时也会被驱逐

  • PreferNoSchedule
    尽量不向该节点调度新建的POD

[root@k8s-master schedulerTest]# kubectl taint node k8s-node02.linux.com fan=error:NoExecute 
node/k8s-node02.linux.com tainted[root@k8s-master schedulerTest]# kubectl describe node k8s-node02.linux.com | grep -i taint
Taints:             fan=error:NoExecute

1.3 删除污点

格式:# kubectl taint node <节点名称> key:{NoSchedule|NoExecute|PreferNoSchedule}-

2、容忍Toleration

apiVersion: apps/v1
kind: Deployment
metadata:name: test5
spec:replicas: 2selector:matchLabels:app: test5template:metadata:labels:app: test5spec:containers:- name: test5image: centos:7imagePullPolicy: IfNotPresentcommand:- sleep- "3600"tolerations:									// 容忍fan=error这个污点- key: "fan"operator: "Equal"value: "error"effect: NoExecute
[root@k8s-master ~]# kubectl get pod -o wide
NAME                         READY   STATUS                   RESTARTS   AGE         IP              NODE                   NOMINATED NODE   READINESS GATES
test5-7575ffc867-hs9hf       1/1     Running                  0          2m1s        10.88.242.129   k8s-node02.linux.com   <none>           <none>
test5-7575ffc867-lp4k2       1/1     Running                  0          2m1s        10.88.201.193   k8s-node01.linux.com   <none>           <none>
http://www.fp688.cn/news/156834.html

相关文章:

  • 山西做网站多少钱广州网站优化平台
  • 支付宝手机网站支付二维码怎么做google广告投放技巧
  • 送菜网站制作株洲seo快速排名
  • 网站的公关和广告活动怎么做发布软文网站
  • 营口网站制作公司企业网站优化
  • 做胃肠科网站短视频搜索优化
  • 做购物网站需要多少钱中国新闻网发稿
  • 青岛哪家公司做网站好南昌seo排名
  • 静态网站开发 内容百度推广一条资源多少钱
  • 行业b2b网站源码编程培训机构加盟哪家好
  • 超值的镇江网站建设seo优化主要做什么
  • 落地页需要建网站吗百度平台商家我的订单查询
  • 做家装的网站泸州网站优化推广
  • 网站规划与网页设计总结在线注册网站
  • 丛台企业做网站推广品牌运营策划
  • dede新手做网站多久苏州百度推广代理商
  • 邯郸网站建设包括哪些各种推广平台
  • 湖北网站seo设计seo点击排名工具
  • 黄冈做学生互评的网站百度推广seo效果怎么样
  • 餐饮商家做网站的好处软文大全
  • 网站维护方案怎么做万网域名查询
  • 搭建一个网站 优帮云简述影响关键词优化的因素
  • 网站建设的主要工作有哪些东莞网站排名提升
  • 闸北区网站建设网页设网站域名查询ip
  • 湛江怎么做网站关键词优化百度升级最新版本下载安装
  • 做企业网站好的电商培训心得体会
  • 西宁网站制作公司什么叫口碑营销
  • 做电影网站只放链接算侵权吗国外引擎搜索
  • 网站制作报价单模板做好网络推广
  • wordpress默认上传路径深圳seo网络优化公司