网站开发公用头部,汽车维修保养网站模板,开发公司采取措施成立新班推动工作,亚马逊雨林在地图上的位置最近准备花一周的时间准备CKS考试#xff0c;在准备考试中发现有一个题目关于RuntimeClass创建和挂载的题目。 专栏其他文章: [CKS] Create/Read/Mount a Secret in K8S-CSDN博客[CKS] Audit Log Policy-CSDN博客 -[CKS] 利用falco进行容器日志捕捉和安全监控-CSDN博客[CKS…最近准备花一周的时间准备CKS考试在准备考试中发现有一个题目关于RuntimeClass创建和挂载的题目。 专栏其他文章: [CKS] Create/Read/Mount a Secret in K8S-CSDN博客[CKS] Audit Log Policy-CSDN博客 -[CKS] 利用falco进行容器日志捕捉和安全监控-CSDN博客[CKS] K8S NetworkPolicy Set Up-CSDN博客[CKS] K8S AppArmor Set Up-CSDN博客[CKS] 利用Trivy对image进行扫描-CSDN博客[CKS] kube-batch修复不安全项-CSDN博客[CKS] K8S ServiceAccount Set Up-CSDN博客[CKS] K8S Admission Set Up-CSDN博客[CKS] K8S Dockerfile和yaml文件安全检测-CSDN博客CKS真题CKA真题 What’s the RuntimeClass
参见官方文档 https://v1-28.docs.kubernetes.io/docs/concepts/containers/runtime-class/
Question 1
Create a RuntimeClass called sandbox that uses the preconfigured runsc runtime for untrusted workloads.
这个题要求我们创建一个叫做sandbox的runtimeclass他的handler是runsc
Practice
编辑/创建 sandbox.yml文件内容如下 创建RuntimeClass
kubectl create -f sandbox.ymlQuestion 2
Configure all Pods in the sunnydale namespace to use gVisor.
这个题要求我们将sunnydale下面所有的pod配置上gVisor这就是我们刚才创建的runtimeClass
Practice 查看sunnydale下面的所有的podkubectl get pod -n sunnydale通过这个我们可以看到所有的pod是通过deployment创建的 这时我们就需要对每个deployment来进行修改使用这个runtimeClass通过kubectl get deployment -n sunnydale可以看到这个下面的所有的deployment 编辑所有deployment kubectl edit deployment -n sunnydale xxx在deployment中添加如下内容
spec:template:spec:runtimeClassName: sandbox配置每个container的runtimeClassName为sandbox