Kubernetes 报错:error creating overlay mount to /var/lib/docker/overlay2 ...

查看 pod 详情:

kubectl describe pod ...

报错:

Error syncing pod, skipping: failed to "StartContainer" for "POD" with RunContainerError: "runContainer: Error response from daemon: {\"message\":\"error creating overlay mount to /var/lib/docker/overlay2/d1e6164d5acd3183e4ec37343e29e9b7c2eae5580def0495d99d93685f1ccc84-init/merged: invalid argument\"}"

解决方法:

// 1. 修改存储类型
vi /etc/sysconfig/docker-storage

// 把空的DOCKER_STORAGE_OPTIONS参数改为overlay:
DOCKER_STORAGE_OPTIONS="--storage-driver overlay"

// 2. 禁用selinux
vi /etc/sysconfig/docker

// 把 --selinux-enabled 置为 false
OPTIONS='--selinux-enabled=false ...'

重启 docker。

你可能感兴趣的:(Kubernetes 报错:error creating overlay mount to /var/lib/docker/overlay2 ...)