以目前最新的稳定版本1.17.2,总结一下Kubelet设定选项更新内容。
版本
[root@host131 ansible]# kubectl get node -o wide
NAME STATUS ROLES AGE VERSION INTERNAL-IP EXTERNAL-IP OS-IMAGE KERNEL-VERSION CONTAINER-RUNTIME
192.168.163.131 Ready <none> 4m19s v1.17.2 192.168.163.131 <none> CentOS Linux 7 (Core) 3.10.0-957.el7.x86_64 docker://19.3.5
[root@host131 ansible]#
问题与对应
如下选项已过时,删除:
- –event-qps={{ var_kubelet_opt_event_qps }} \
- –kube-api-qps={{ var_kubelet_opt_kpi_qps }} \
- –kube-api-burst={{ var_kubelet_opt_api_brust }} \
- –registry-qps={{ var_kubelet_opt_reg_qps }} \
swap设定:
-
–fail-swap-on=False \
-
错误提示信息如下所示:
Flag --fail-swap-on has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
- 对应方法
在config指定的配置文件中添加如下内容:
failSwapOn: False
- 重启后确认
[root@host131 k8s]# systemctl status kubelet -l
● kubelet.service - Kubernetes Kubelet Service
Loaded: loaded (/usr/lib/systemd/system/kubelet.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2020-01-31 15:08:38 EST; 7s ago
Docs: https://github.com/GoogleCloudPlatform/kubernetes
Main PID: 31508 (kubelet)
Tasks: 8
Memory: 11.1M
CGroup: /system.slice/kubelet.service
└─31508 /usr/local/bin/kubelet --logtostderr=False --v=2 --log-dir=/var/log/kubernetes --root-dir=/var/lib/kubelet --cert-dir=/etc/ssl/k8s --hostname-override=192.168.163.131 --bootstrap-kubeconfig=/etc/ssl/k8s/bootstrap.kubeconfig --kubeconfig=/etc/k8s/kubelet.kubeconfig --config=/etc/k8s/kubelet-config.yaml --pod-infra-container-image=gcr.io/google_containers/pause-amd64:3.1 --image-pull-progress-deadline=30m
Jan 31 15:08:38 host131 systemd[1]: Stopped Kubernetes Kubelet Service.
Jan 31 15:08:38 host131 systemd[1]: Started Kubernetes Kubelet Service.
[root@host131 k8s]#
地址
- https://github.com/liumiaocn/easypack/tree/master/k8s/ansible