有人可以告诉我如何在centos7.2中为kubelet设置cgroup驱动程序吗? 官方文档不起作用... https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/install-kubeadm/#configure-cgroup-driver-used-by-kubelet-on-control-plane-node
答案 0 :(得分:1)
使用以下命令
public class Demo : MonoBehaviour
{
#pragma warning disable 0649
[SerializeField] private EventSystem _eventSystem;
[SerializeField] private GraphicRaycaster _graphicRaycaster;
#pragma warning restore 0649
private void Update()
{
if (Input.GetMouseButtonDown(0))
{
if (TestClickEvent(Input.mousePosition))
{
Debug.Log("Clicked UI Element");
}
}
}
private bool TestClickEvent(Vector3 mousePos)
{
PointerEventData data = new PointerEventData(_eventSystem);
data.position = mousePos;
List<RaycastResult> results = new List<RaycastResult>();
_graphicRaycaster.Raycast(data, results);
if(results.Count > 0)
{
//You can loop through the results to test for a specific UI element
return true;
}
return false;
}
}
您还可以尝试以下方法为docker设置cgroup驱动程序
sed -i 's|systemd|cgroupfs|g' /etc/systemd/system/kubelet.service.d/10-kubeadm.conf