Kubernetes》》K8S》》Pod调度机制

nodeName 、nodeSelector

nodeName 是强绑定,nodeSelector是弱绑定

强绑定,如果Node失效时,则会导致Pod也无法调度

csharp 复制代码
apiVersion: v1
kind: Pod
metadata:
  name: example-pod
spec:
  # nodeName Pod应该被调度到哪个具体的节点上  强绑定
  nodeName: specific-node-name 
  containers:
  - name: example-container
    image: nginx
csharp 复制代码
apiVersion: v1
kind: Pod
metadata:
  name: example-pod
spec:
  #nodeSelector 使用标签(Labels)和标签选择器(Label Selectors)来决定Pod应该被调度到哪些节点上。  弱绑定
  nodeSelector:
    yy: xxx
  containers:
  - name: example-container
    image: nginx


相关推荐
问简3 小时前
docker 镜像相关
运维·docker·容器
Benszen4 小时前
Docker容器化技术实战指南
运维·docker·容器
lin_dec+4 小时前
Serverless:零成本按需计算的未来
云原生·serverless
Hommy884 小时前
【开源剪映小助手】Docker 部署
docker·容器·开源·github·aigc
斯普信云原生组6 小时前
Prometheus 环境监控虚机 Redis 方案(生产实操版)
运维·docker·容器
喵了几个咪6 小时前
如何在 Superset Docker 容器中安装 MySQL 驱动
mysql·docker·容器·superset
工具罗某人6 小时前
docker compose部署kafka集群搭建
docker·容器·kafka
迷藏4946 小时前
**eBPF实战进阶:从零构建网络流量监控与过滤系统**在现代云原生架构中,**网络可观测性**和**安全隔离**已成为
java·网络·python·云原生·架构
刘~浪地球7 小时前
架构设计--事件驱动架构设计与实现(05)
云原生·系统架构·云计算
鬼先生_sir7 小时前
Zookeeper:从入门到精通
分布式·zookeeper·云原生