How do we provide arguments to kubelet service in rancher managed kubernetes

Hello,

We use rancher ENV template to create kubernetes ENV. How do we change arguments supplied to kubelet service if we want to?
We are trying to address one of the issue “POD Eviction” status by providing necesarry argument to kubelet service.

Please suggest.

–Tarun

Which rancher version do you use? There be already “Additional kubelet flag” in the template.

We are using 1.6.10 and yes there are addition kubelet flags. Ok got that, in Edit section of template.
Can we provide additional kubelet flag into existing/running kubernetes in rancher?

yes, but you have to edit your existing catalog by rancherUI > KUBERNETES > infrastructure stacks > kubernetes, click “update to date” and select your current template version, add your desired flags there and click “upgrade”. Then kubelet components will be upgraded with your flags.

Thanks, will try and get back if any issue.

Hi @Tarun_Prakash @hiscal ,

I am trying to add additional kubelet flags in the k8s custom template and even tried to create a new environment with it but the kubelet is not coming online.

I want to add oidc flags “–oidc-issuer-url=https://dex.k8s.example.com/dex --oidc-client-id=loginapp --oidc-ca-file=/etc/kubernetes/ssl/ca.pem --oidc-username-claim=name --oidc-groups-claim=groups” in the column but could not make it work.

Could you please provide an example line how/what did you put in the ‘additional kubelet flags’ column.

Thanks in advance,
Manokaran

I was adding api server flags to kubelet flags that’s the reason why it was not online. Is there a way to add Kube api server flags into kubernetes template in Rancher