I'm setting up a Kubernetes cluster following Kelseys Lab: https://github.com/kelseyhightower/kubernetes-the-hard-way
I have only set up one node so far. When trying to deploy a Pod, the following error prevents it from getting started:
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"
Sounds like SELinux is preventing
kubelet from performing changes on IPtables. Search for messages containing the string 'AVC' inside
/var/log/audit/audit.log in order to confirm that theory.
The easiest workaround is to disable SELinux altogether with the shell command
setenforce 0. This doesn't survive a reboot, so make sure you also disable SELinux in
If you don't want to disable SELinux completely, which I'd recommend, you will have to use tools like
semodule in order to build your own SELinux module for
Check these references for further guidance: