我在如下所示的环境中在WSL2上安装了Ubuntu。 当我尝试使用以下所示的步骤将此Ubuntu注册为Kubernetes集群的工作节点时, 发生错误。 如何注册Ubuntu?
[我的环境]
Windows 10 Pro Insider Preview 1903内部版本18922.1000
WSL2 Ubuntu
主节点
[我的步骤]
在WSL2上运行Ubuntu
启动Docker服务
$ sudo service docker start
创建令牌以加入MasterNode上的集群
$ kubeadm token generate
$ kubeadm token create [key] --print-join-command
在Ubuntu上执行以下命令
$ sudo kubeadm join [masterIP]:6443 --token [token] --discovery-token-ca-cert-hash [hash]
[结果]
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the
Docker cgroup driver. The recommended driver is "systemd". Please
follow the guide at https://kubernetes.io/docs/setup/cri/
[preflight] The system verification failed. Printing the output from the verification:
KERNEL_VERSION: 4.19.43-microsoft-standard
CONFIG_NAMESPACES: enabled
CONFIG_NET_NS: enabled
CONFIG_PID_NS: enabled
CONFIG_IPC_NS: enabled
CONFIG_UTS_NS: enabled
CONFIG_CGROUPS: enabled
CONFIG_CGROUP_CPUACCT: enabled
CONFIG_CGROUP_DEVICE: enabled
CONFIG_CGROUP_FREEZER: enabled
CONFIG_CGROUP_SCHED: enabled
CONFIG_CPUSETS: enabled
CONFIG_MEMCG: enabled
CONFIG_INET: enabled
CONFIG_EXT4_FS: enabled
CONFIG_PROC_FS: enabled
CONFIG_NETFILTER_XT_TARGET_REDIRECT: enabled
CONFIG_NETFILTER_XT_MATCH_COMMENT: not set
CONFIG_OVERLAY_FS: enabled
CONFIG_AUFS_FS: not set - Required for aufs.
CONFIG_BLK_DEV_DM: enabled
DOCKER_VERSION: 18.09.5
DOCKER_GRAPH_DRIVER: overlay2
OS: Linux
CGROUPS_CPU: enabled
CGROUPS_CPUACCT: enabled
CGROUPS_CPUSET: enabled
CGROUPS_DEVICES: enabled
CGROUPS_FREEZER: enabled
CGROUPS_MEMORY: enabled
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Service-Docker]: docker service is not active, please run 'systemctl start docker.service'
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist
[ERROR SystemVerification]: unexpected kernel config: CONFIG_NETFILTER_XT_MATCH_COMMENT
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`