curl -sfL https://rancher-mirror.rancher.cn/k3s/k3s-install.sh |
INSTALL_K3S_MIRROR=cn INSTALL_K3S_VERSION=v1.33.7-k3s1
K3S_TOKEN=12345
sh -s - server
–cluster-init
–token 12345
–system-default-registry=registry.cn-hangzhou.aliyuncs.com
使用以上命令安装
journalctl -u k3s -f
Mar 20 14:13:26 k8s1 k3s[18516]: E0320 14:13:26.885510 18516 resource_quota_controller.go:446] “Unhandled Error” err=“unable to retrieve the complete list of server APIs: metrics.k8s.io/v1beta1: stale GroupVersion discovery: metrics.k8s.io/v1beta1”
Mar 20 14:13:27 k8s1 k3s[18516]: I0320 14:13:27.325980 18516 garbagecollector.go:787] “failed to discover some groups” groups=“map["metrics.k8s.io/v1beta1":"stale GroupVersion discovery: metrics.k8s.io/v1beta1"]”
Mar 20 14:13:46 k8s1 k3s[18516]: E0320 14:13:46.747160 18516 log.go:32] “PullImage from image service failed” err=“rpc error: code = DeadlineExceeded desc = failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/rancher/local-path-provisioner:v0.0.32": failed to copy: httpReadSeeker: failed open: failed to do request: Get "http://aliregistry.oss-cn-hangzhou.aliyuncs.com/docker/registry/v2/blobs/sha256/cb/cb584e17a5f4bdc03011c803f10a77af4e3be190745705c716cdb6cd35cd6e5d/data?Expires=1773988995&OSSAccessKeyId=LTAI4FsQYu7kG56rtBsQAHfw&Signature=jy7unhnIYAVLquMyFQKzAKNAXBU%3D&x-oss-traffic-limit=1048576\”: dial tcp 211.95.77.255:80: i/o timeout" image=“registry.cn-hangzhou.aliyuncs.com/rancher/local-path-provisioner:v0.0.32”
Mar 20 14:13:46 k8s1 k3s[18516]: E0320 14:13:46.747771 18516 kuberuntime_image.go:42] “Failed to pull image” err=“rpc error: code = DeadlineExceeded desc = failed to pull and unpack image "registry.cn-hangzhou.aliyuncs.com/rancher/local-path-provisioner:v0.0.32": failed to copy: httpReadSeeker: failed open: failed to do request: Get "http://aliregistry.oss-cn-hangzhou.aliyuncs.com/docker/registry/v2/blobs/sha256/cb/cb584e17a5f4bdc03011c803f10a77af4e3be190745705c716cdb6cd35cd6e5d/data?Expires=1773988995&OSSAccessKeyId=LTAI4FsQYu7kG56rtBsQAHfw&Signature=jy7unhnIYAVLquMyFQKzAKNAXBU%3D&x-oss-traffic-limit=1048576\”: dial tcp 211.95.77.255:80: i/o timeout" image=“registry.cn-hangzhou.aliyuncs.com/rancher/local-path-provisioner:v0.0.32”
