From 910e35c457afe2a21560b80a787545bbf0e6082b Mon Sep 17 00:00:00 2001 From: netroby Date: Sat, 19 Aug 2017 03:06:59 +0800 Subject: [PATCH] Tips for centos to resolve startup problem (#4755) * Tips for centos to resolve startup problem * Update document to diagnose centos setup problem * Update create-cluster-kubeadm.md --- .../independent/create-cluster-kubeadm.md | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/setup/independent/create-cluster-kubeadm.md b/docs/setup/independent/create-cluster-kubeadm.md index a699d24f73..e4665c5269 100644 --- a/docs/setup/independent/create-cluster-kubeadm.md +++ b/docs/setup/independent/create-cluster-kubeadm.md @@ -559,6 +559,28 @@ Another workaround is to overwrite the default `kubeconfig` for the "admin" user sudo chown $(id -u):$(id -g) $HOME/.kube/config ``` +1. If you are using CentOS and encounter difficulty while setting up the master node: + + Verify that your Docker cgroup driver matches the kubelet config: + +``` +docker info |grep -i cgroup +cat /etc/systemd/system/kubelet.service.d/10-kubeadm.conf +``` + + If the Docker cgroup driver and the kubelet config don't match, change the kubelet config to match the Docker cgroup driver: + +``` +update KUBELET_CGROUP_ARGS=--cgroup-driver=systemd to KUBELET_CGROUP_ARGS=--cgroup-driver=cgroupfs +``` + + Then restart kubelet: + +``` +systemctl daemon-reload +service kubelet restart +``` + The `kubectl describe pod` or `kubectl logs` commands can help you diagnose errors. For example: ```bash @@ -569,5 +591,4 @@ kubectl -n ${NAMESPACE} logs ${POD_NAME} -c ${CONTAINER_NAME} {% endcapture %} - {% include templates/task.md %}