Last active
December 27, 2020 06:19
-
-
Save haircommander/2c07cc23887fa7c7f083dc61c7ef5791 to your computer and use it in GitHub Desktop.
An /etc/default/kubelet file to quickly configure kubelet variables to use CRI-O with kubeadm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KUBELET_EXTRA_ARGS=--feature-gates="AllAlpha=false,RunAsGroup=true" --container-runtime=remote --cgroup-driver=systemd --container-runtime-endpoint='unix:///var/run/crio/crio.sock' --runtime-request-timeout=5m |
thanks for your comment @Kali-lightsaber, i think I'm going to update the documentation to use the script i created here cri-o/cri-o#4393 (comment) with native kubeadm config print...
, instead of putting files in different places
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
May be usefull:
Kubelet from scratch config using by systemd /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf
--kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_CONFIG_ARGS=--config=/var/lib/kubelet/config.yaml"
This is a file that "kubeadm init" and "kubeadm join" generate at runtime, populating
the KUBELET_KUBEADM_ARGS variable dynamically
EnvironmentFile=-/var/lib/kubelet/kubeadm-flags.env
This is a file that the user can use for overrides of the kubelet args as a last resort. Preferably,
the user should use the .NodeRegistration.KubeletExtraArgs object in the configuration files instead.
KUBELET_EXTRA_ARGS should be sourced from this file.
EnvironmentFile=-/etc/default/kubelet
ExecStart=
ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_CONFIG_ARGS $KUBELET_KUBEADM_ARGS $KUBELET_EXTRA_ARGS
from - https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/kubelet-integration/