1.题目概述
- 创建pod名称nginx-kusc0041,镜像nginx
-
2.解析
-
3.参考答案
# 查看是否有节点有disk=ssd标签
kubectl get nodes --show-labels
# 没有的话给节点添加disk=ssd标签
kubectl label nodes <your-node-name> disk=ssd
apiVersion: v1
kind: Pod
metadata:
name: nginx-kusc0041
spec:
containers:
- name: nginx
image: nginx
nodeSelector:
disktype: ssd
https://kubernetes.io/zh/docs/tasks/configure-pod-container/assign-pods-nodes/
上一篇:08扩容 deployment