问题描述
AFAIK,准入控制器是提交到数据库之前的最后一遍.
AFAIK, the admission controller is the last pass before the submission to the database.
但是我不知道启用了哪一个,是否有办法知道哪个正在生效?
However I cannot know which one is enabled, Is there a way to know which one is taking effect?
谢谢.
推荐答案
kube-apiserver在您的kube-apiserver中运行-< example.com>容器.该应用程序目前没有get方法来获取已启用的准入插件,但是您可以从其命令行获取启动参数.
The kube-apiserver is running in your kube-apiserver-< example.com > container.The application does not have a get method at the moment to obtain the enabled admission plugins, but you can get the startup parameters from its command line.
kubectl -n kube-system describe po kube-apiserver-example.com
另一种查看容器中内容的方法:不幸的是,容器中没有"ps"命令,但是您可以从/proc获得初始过程命令参数,如下所示:
Another way, to see what is in the container: unfortunately there is no "ps" command in the container, but you can get the initial process command parameters from /proc , something like that:
kubectl -n kube-system exec kube-apiserver-example.com -- sed 's/--/\n/g' /proc/1/cmdline
可能类似于:
这篇关于如何在kubernetes中获取启用准入控制器列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!