问题
I try to install Kuberneties cluster on SLES. But When I do Kubeadm init using below command it gives given error.
Kubeadm init
kubeadm init --pod-network-cidr=10.244.0.0/16 --kubernetes-version=1.15.3
Error
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR SystemVerification]: unsupported graph driver: btrfs
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
In SLES default file system is btrfs. So as per the official docker documentation Get Docker EE for SLES I add below in /etc/docker/daemon.json
{
"storage-driver": "btrfs"
}
So what would be wrong? Need your kind assistance.
*********************************EDITED*************************************
Docker Status
systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/docker.service.d
└─flannel.conf
Active: active (running) since Thu 2019-08-22 17:21:59 CST; 1h 21min ago
Docs: https://docs.docker.com
Main PID: 3188 (dockerd)
Tasks: 24
Memory: 52.9M
CPU: 1.723s
CGroup: /system.slice/docker.service
└─3188 /usr/bin/dockerd --insecure-registry 192.***.***.***:***
Docker info
Containers: 2
Running: 0
Paused: 0
Stopped: 2
Images: 1
Server Version: 18.09.4
Storage Driver: btrfs
Build Version: Btrfs v4.9.1
Library Version: 102
Logging Driver: json-file
Cgroup Driver: cgroupfs
Docker-ee version.
Client:
Version: 18.09.4
API version: 1.39
Go version: go1.10.6
Git commit: c3516c4
Built: Wed Mar 27 18:11:35 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Enterprise
Engine:
Version: 18.09.4
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: c3516c4
Built: Wed Mar 27 18:05:47 2019
OS/Arch: linux/amd64
Experimental: false
df -Th
/dev/mapper/data_vg-var btrfs **G 407M **G 1% /var
/dev/mapper/data_vg-var_lib btrfs **G 232M **G 1% /var/lib
/dev/mapper/data_vg-var_lib_docker btrfs **G 17M **G 1% /var/lib/docker
sudo cat /proc/filesystems | grep btrfs
# sudo cat /proc/filesystems | grep btrfs
btrfs
Edited /etc/docker/daemon.json as below
{
"storage-driver": "btrfs"
}
Thank You
回答1:
Errors mostly occures when prerequisites steps from documentation haven't been covered, so please check you have them all:
- install Docker EE
- btrfs requires a dedicated block device (such as a physical disk), which must be formatted for Btrfs and mounted into /var/lib/docker/
- btrfs support must exist in your kernel. To check this, run following command:
$ sudo cat /proc/filesystems | grep btrfs
- you need the btrfs command. If you do not have this command, install the btrfsprogs package (for SLES)
Then please follow steps from Configure Docker to use the btrfs storage driver section and let me know if problem still exists.
回答2:
Here is the issue.
SLES uses btrfs by default. The docker “overlay” driver is not supported with this file-system, so it is sensible to use etx4 in /var/lib/docker.
Even if we tell Docker about BTRFS :
https://docs.docker.com/storage/storagedriver/btrfs-driver/
Kubeadm will still complain.
So use use etx4 in /var/lib/docker.
来源:https://stackoverflow.com/questions/57589205/giving-error-saying-unsupported-graph-driver-btrfs-in-sles-when-try-to-kubead