题目
该 cluster使用 containerd作为CRI运行时。containerd的默认运行时处理程序是runc。
containerd已准备好支持额外的运行时处理程序runsc (gVisor)。
使用名为runsc的现有运行时处理程序,创建一个名为untrusted 的RuntimeClass。
更新 namespace server中的所有Pod以在gVisor上运行。
您可以在 /cks/gVisor/rc.yaml中找到一个模版清单。
参考
容器运行时类(Runtime Class) | Kubernetes
解答
创建runtimeClass
apiVersion: node.k8s.io/v1beta1
kind: RuntimeClass
metadata:
name: untrusted
handler: runsc
查询一下
kubectl get RuntimeClass
查询server下的pod
kubectl get all -n server
能查出来2个pod一个deployment,最新的题目是3个deployment,所以修改的时候就edit deployment就好,都是加一句(在container那一句上头加)
spec:
runtimeClassName: untrusted
containers: