2016-08-20 99 views
0

我设置了一个Kubernetes集群以下Kelseys实验室开始:https://github.com/kelseyhightower/kubernetes-the-hard-wayiptables的错误阻止吊舱在Kubernetes

我只设置了一个节点为止。当试图部署波德,下面的错误阻止它入门:

Warning FailedSync Error syncing pod, skipping: failed to "SetupNetwork" for "nginx-3137573019-pjbie_default" with SetupNetworkError: "Failed to setup network for pod \"nginx-3137573019-pjbie_default(b4128fc1-6707-11e6-a8b3-005056a2068d)\" using network plugins \"kubenet\": Failed to execute iptables-restore: exit status 1 (Can't open /tmp/kube-temp-iptables-restore-214792160: Permission denied\n); Skipping pod"

的kubelet以root身份运行。日志中提到的文件也属于根目录。

是Linux系统OEL 7(内核:UEK 4.1.12)

有没有人有一个想法,什么原因可能是,或如何进一步调查?

回答

2

听起来像SELinux阻止kubelet在IPtables上执行更改。搜索/var/log/audit/audit.log中包含字符串'AVC'的消息以确认该理论。

最简单的解决方法是使用shell命令setenforce 0完全禁用SELinux。这无法在重新启动后存活,因此请确保您也禁用了/etc/selinux/config中的SELinux。

如果你不想完全禁用SELinux,这我建议,你将不得不为了建立自己的SELinux模块kubeletkube-proxy使用的工具,如audit2allowsemodule

检查这些文献为进一步指导:

+0

这奏效了,谢谢! – fischerman

相关问题