Hi guys,
I create this issue as future reference if anyone has the same symptoms. It took me DAYS to figure out what was wrong.
Here's my specs:
OVH VPS with standard Debian 8
Heres the symtoms:
Ansible: kubernetes/master : Master | wait for kube-apiserver FAILED
etcd logs: malformed http request / connexion refused
kubelet logs: Failed to start ContainerManager system validation failed - Following Cgroup subsystem not mounted: [memory] / Failed to connect to 127.0.0.1 port 8080: Connection refused
First of, I have activated manually net.ipv4.ip_forward=1. I know there is a task to do that in the ansible but I have not verified if it did the job.
Second issue. For malformed http request / connexion refused. I don't know why but etcd would NOT work if I set ansible_ssh_host to the fqdn of my servers in the inventory. etcd show a healthy cluster if I set IPs instead.
By the way : Does kargo works on a single server cluster (for test purpose) ? etcd is properly configured with only one server ?
Third issue. Failed to connect to 127.0.0.1 port 8080: Connection refused was due to kube-apiserver not started by the kubelet container. The reason why it was'nt : Failed to start ContainerManager system validation failed - Following Cgroup subsystem not mounted: [memory].
If you run https://github.com/docker/docker/blob/master/contrib/check-config.sh you can see
- CONFIG_MEMCG_SWAP_ENABLED: missing
(cgroup swap accounting is currently not enabled, you can enable it by setting boot option "swapaccount=1")
You can set this up by editing the /etc/default/grub and setting the following option :
GRUB_CMDLINE_LINUX="cgroup_enable=memory swapaccount=1"
update-grub
reboot
And voil脿, problem solved.
I know this is system related, but the kube cluster can't work without this option, maybe you should specify that in the requirements or maybe add a verification at the docker install steps.
Sorry for the long post, but it may be useful to someone.
Most helpful comment
https://github.com/kubernetes/kubernetes-anywhere/blob/fd0670ba051bf96be335a3291dab7039a32381d7/FIXES.md