CKA 模拟真题 Killer.sh | Question 11 | DaemonSet on all Nodes
Use context: kubectl config use-context k8s-c1-H
Use Namespace project-tiger for the following. Create a DaemonSet named ds-important with image httpd:2.4-alpine and labels id=ds-important and uuid=18426a0b-5f59-4e10-923f-c0e078e82462 . The Pods it creates should request 10 millicore cpu and 10 mebibyte memory. The Pods of that DaemonSet should run on all nodes, also controlplanes.
译文
在命名空间 project-tiger 进行如下操作。创建一个名为 ds-important 的 DaemonSet ,镜像为 httpd:2.4-alpine ,标签 id=ds-important , uuid=18426a0b-5f59-4e10-923f-c0e078e82462 。它所创建的Pod应该要求 10个毫核cpu 和 10个mebibyte内存。该 DaemonSet 的 Pod 应该在所有的节点上运行,包括 控制平面 。
解答
通过创建 deployment 来创建 daemonset
k -n project-tiger create deployment --image=httpd:2.4-alpine ds-important $do > 11.yaml |
11.yaml
# 11.yaml |
应用文件创建pod,并检查状态
k -f 11.yaml create |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Hao DevSecOps!
评论



