docker版本Docker version 20.10.17, build 100c701
k3s版本1.20.15
安装过程:
1、放置离线包
mkdir -p /var/lib/rancher/k3s/agent/images/
mv k3s /usr/local/bin
chmod +x /usr/local/bin/k3s
mv k3s-airgap-images-amd64.tar /var/lib/rancher/k3s/agent/images/
docker load -i /var/lib/rancher/k3s/agent/images/k3s-airgap-images-amd64.tar
2、设置环境变量
export INSTALL_K3S_SKIP_DOWNLOAD=true
export INSTALL_K3S_EXEC="--datastore-endpoint=mysql://k3s:2022qazEDC@tcp(192.168.2.107:3306)/k3sdb --docker --data-dir /data/k3s --kube-apiserver-arg service-node-port-range=1-65000 --no-deploy traefik --write-kubeconfig ~/.kube/config --write-kubeconfig-mode 666"
./k3s-install.sh
结果提示启动失败,查看到的日志为
Jul 28 09:40:04 glory100 k3s[25521]: time="2022-07-28T09:40:04.107525408+08:00" level=info msg="Waiting for node glory100 CIDR not assigned yet"
Jul 28 09:40:04 glory100 k3s[25521]: I0728 09:40:04.726958 25521 controller.go:132] OpenAPI AggregationController: action for item : Nothing (removed from the queue).
Jul 28 09:40:04 glory100 k3s[25521]: I0728 09:40:04.727031 25521 controller.go:132] OpenAPI AggregationController: action for item k8s_internal_local_delegation_chain_0000000000: Nothing (removed from the queue).
Jul 28 09:40:04 glory100 k3s[25521]: I0728 09:40:04.735346 25521 storage_scheduling.go:148] all system priority classes are created successfully or already exist.
Jul 28 09:40:05 glory100 k3s[25521]: I0728 09:40:05.489807 25521 node.go:172] Successfully retrieved node IP: fd72:865a:d6b8::76a
Jul 28 09:40:05 glory100 k3s[25521]: I0728 09:40:05.489910 25521 server_others.go:140] kube-proxy node IP is an IPv6 address (fd72:865a:d6b8::76a), assume IPv6 operation
Jul 28 09:40:05 glory100 k3s[25521]: I0728 09:40:05.495167 25521 server_others.go:186] Using iptables Proxier.
Jul 28 09:40:05 glory100 k3s[25521]: F0728 09:40:05.495211 25521 server.go:495] unable to create proxier: CIDR 10.42.0.0/16 has incorrect IP version: expect isIPv6=true
Jul 28 09:40:05 glory100 systemd[1]: k3s.service: main process exited, code=exited, status=1/FAILURE
Jul 28 09:40:05 glory100 systemd[1]: Failed to start Lightweight Kubernetes.
请帮忙看看原因