FAQ of k8s, docker and glusterfs

2017-05-11 Klaus Ma 更多博文 » 博客 » GitHub »

原文链接 http://www.k8s.tips/tech/2017/05/11/k8s_docker_tips/
注:以下为加速网络访问所做的原文缓存,经过重新格式化,可能存在格式方面的问题,或偶有遗漏信息,请以原文为准。


Change Docker Imange location

Edit /etc/docker/daemon.json in Ubuntu:

{
    "live-restore": true,
    "graph": "/data/docker"
}

Kuberentes Errors

In following erro may because of changing docker image location, no solution for now:

3m  3m  1   kubelet, 9.111.143.205      Warning FailedSync  Error syncing pod, skipping: failed to "StartContainer" for "POD" with RunContainerError: "addNDotsOption: ResolvConfPath \"/data/docker/containers/cdc30b87403ef938964754e34ad3ce5b4c1ceb950a0af72ff1e531c235eaad21/resolv.conf\" does not exist"

Glusterfs Errors

Redirecting to /bin/systemctl status  glusterd.service
glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled)
   Active: failed (Result: exit-code) since Fri 2014-09-26 01:47:54 EDT; 5min ago
  Process: 25116 ExecStart=/usr/sbin/glusterd -p /run/glusterd.pid (code=exited, status=1/FAILURE)

Sep 26 01:47:54 datasvr1 systemd[1]: glusterd.service: control process exited, code=exited status=1
Sep 26 01:47:54 datasvr1 systemd[1]: Failed to start GlusterFS, a clustered file-system server.
Sep 26 01:47:54 datasvr1 systemd[1]: Unit glusterd.service entered failed state.

The root cause is glusterfs can not use non-empty working directory; the solution is to clear working-directory in /etc/glusterfs/glusterd.vol.

GlusterFS Errors

Readiness probe failed: ● glusterd.service - GlusterFS, a clustered file-system server
   Loaded: loaded (/usr/lib/systemd/system/glusterd.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

Resolved by: systemctl stop rpcbind.socket