版本:rke2-agent-1.21.11或rke2-agent-1.21.10
操作系统:CentOS 8
问题描述:
在/etc/rancher/rke2/config.yaml中添加以下内容
kubelet-arg:
- "enforce-node-allocatable=pods,kube-reserved,system-reserved"
- "kube-reserved=cpu=1,memory=1G"
- "system-reserved=cpu=70,memory=225Gi"
启动agent后,日志重复出现下列错误信息:
Apr 19 16:28:03 gpu-10 rke2[908537]: time=“2022-04-19T16:28:03+08:00” level=error msg=“Kubelet exited: exit status 1”
注释kubelet-arg的内容后agent可以正常启动。
日志
Apr 19 16:28:03 gpu-10 systemd[1]: Started Rancher Kubernetes Engine v2 (agent).
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --volume-plugin-dir has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --file-check-frequency has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --sync-frequency has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --address has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --anonymous-auth has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --authentication-token-webhook has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --authorization-mode has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --cgroup-driver has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --client-ca-file has been deprecated, This parameter should be set via the config file specified by the Kubelet’s --config flag. See Set Kubelet parameters via a config file | Kubernetes for more information.
Apr 19 16:28:03 gpu-10 rke2[908537]: Flag --cloud-provider has been deprecated, will be removed in 1.23, in favor of removing cloud provider code from Kubelet.
…
Apr 19 16:28:03 gpu-10 rke2[908537]: time=“2022-04-19T16:28:03+08:00” level=error msg=“Kubelet exited: exit status 1”