adamant-kite-43734
05/10/2023, 1:21 PMbulky-sunset-52084
config.yaml
at /etc/rancher/rke2/config.yaml
. you can also set the config options for clusters via the cluster crd under the rkeConfig
section
https://docs.rke2.io/install/configurationsparse-businessperson-74827
05/10/2023, 1:36 PMbulky-sunset-52084
bulky-sunset-52084
sparse-businessperson-74827
05/10/2023, 1:53 PMconfig.yaml
at /etc/rancher/rke2
but there is /etc/rancher/rke2/config.yaml.d/50-rancher.yaml
but it it's not yaml file and I'm not sure it is correct one.
I just need to modify eviction-hard
to modify disk pressure thresholds on the nodesbulky-sunset-52084
sparse-businessperson-74827
05/10/2023, 2:40 PM"kubelet": [
"extra_args": [
"eviction-hard: "imagefs.available<5%,nodefs.available<5%" ]]
bulky-sunset-52084
--kubelet-arg
so take that flag and convert it to JSON and put it in that 50-rancher.yaml file.
"kubelet-args": [
"eviction-hard: "imagefs.available<5%,nodefs.available<5%"
]
I'll test this too - just give me a few - its possible I messed up the syntax heresparse-businessperson-74827
05/10/2023, 3:28 PMbulky-sunset-52084
eviction-hard
that might have something to do with itbulky-sunset-52084
sparse-businessperson-74827
05/10/2023, 3:33 PM"
was missing, here is that worked so far:
"kubelet-args": [
"eviction-hard": "imagefs.available<5%,nodefs.available<5%"
],
now need to test itsparse-businessperson-74827
05/10/2023, 3:38 PMsparse-businessperson-74827
05/10/2023, 3:48 PMFlag --eviction-minimum-reclaim 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.
bulky-sunset-52084
sparse-businessperson-74827
05/10/2023, 3:49 PMkind: KubeletConfiguration
but when trying to apply getting
no matches for kind "KubeletConfiguration" in version "<http://kubelet.config.k8s.io/v1beta1|kubelet.config.k8s.io/v1beta1>"
bulky-sunset-52084
sparse-businessperson-74827
05/10/2023, 4:23 PMapiVersion: <http://kubelet.config.k8s.io/v1beta1|kubelet.config.k8s.io/v1beta1>
kind: KubeletConfiguration
evictionHard:
nodefs.available: "1Gi"
imagefs.available: "100Gi"
nodefs.inodesFree: "1%"
I made a change in 50-rancher.yaml file to load my file:
"kubelet-arg": [
"config=/tmp/kube-config.yaml"
],
the service restarts the logs do not show problems loading file
time="2023-05-10T16:16:00Z" level=info msg="Running kubelet --address=0.0.0.0 --alsologtostderr=false --anonymous-auth=false --authentication-token-webhook=true --authorization-mode=Webhook --cgroup-driver=systemd --client-ca-file=/var/lib/rancher/rke2/agent/client-ca.crt --cloud-provider=external --cluster-dns=10.43.0.10 --cluster-domain=cluster.local --config=/tmp/kube-config.yaml --container-runtime-endpoint=unix:///run/k3s/containerd/containerd.sock --containerd=/run/k3s/containerd/containerd.sock --eviction-hard=imagefs.available<5%,nodefs.available<5% --eviction-minimum-reclaim=imagefs.available=10%,nodefs.available=10% --fail-swap-on=false --healthz-bind-address=127.0.0.1 --hostname-override=dev-master-3 --kubeconfig=/var/lib/rancher/rke2/agent/kubelet.kubeconfig --log-file=/var/lib/rancher/rke2/agent/logs/kubelet.log --log-file-max-size=50 --logtostderr=false --node-ip=10.0.0.13 --node-labels=<http://cattle.io/os=linux,rke.cattle.io/machine=af095b89-819a-4320-9e60-9ac1d3d2f824,topology.kubernetes.io/region=hel1,topology.kubernetes.io/zone=hel1-dc2|cattle.io/os=linux,rke.cattle.io/machine=af095b89-819a-4320-9e60-9ac1d3d2f824,topology.kubernetes.io/region=hel1,topology.kubernetes.io/zone=hel1-dc2> --pod-infra-container-image=<http://index.docker.io/rancher/pause:3.6|index.docker.io/rancher/pause:3.6> --pod-manifest-path=/var/lib/rancher/rke2/agent/pod-manifests --read-only-port=0 --register-with-taints=<http://node-role.kubernetes.io/control-plane:NoSchedule,node-role.kubernetes.io/etcd:NoExecute|node-role.kubernetes.io/control-plane:NoSchedule,node-role.kubernetes.io/etcd:NoExecute> --resolv-conf=/run/systemd/resolve/resolv.conf --serialize-image-pulls=false --stderrthreshold=FATAL --tls-cert-file=/var/lib/rancher/rke2/agent/serving-kubelet.crt --tls-private-key-file=/var/lib/rancher/rke2/agent/serving-kubelet.key"
but from above I still see that it doe not take my config as --eviction-hard=imagefs.available<5%,nodefs.available<5%
and I still seeing
Flag --eviction-hard 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.
Any ideas what is missing?green-rain-9522
06/19/2023, 9:29 AMsparse-businessperson-74827
06/19/2023, 9:32 AM