kubelet
Ansible Role: kubelet
Role to install (by default) kubelet on Debian/Ubuntu and EL systems.
Requirements
None.
Role Variables
Available variables are listed below (located in defaults/main.yml
):
Variables list:
kubelet_app: kubelet
kubelet_version: 1.31.0
kubelet_os: "{{ ansible_system | lower }}"
kubelet_architecture_map:
amd64: amd64
arm: arm64
x86_64: amd64
armv6l: armv6
armv7l: armv7
aarch64: arm64
32-bit: "386"
64-bit: amd64
kubelet_dl_url: https://dl.k8s.io/release/v{{ kubelet_version }}/bin/{{ kubelet_os }}/{{ kubelet_architecture_map[ansible_architecture] }}/{{ kubelet_app }}
kubelet_bin_path: /usr/local/bin
kubelet_file_mode: '0755'
kubelet_systemd_service_setup: true
kubelet_systemd_template_out_dir: /etc/systemd/system
kubelet_systemd_template_in_file: kubelet.service.j2
kubelet_systemd_template_out_file: kubelet.service
kubelet_systemd_dropin_dir: "{{ kubelet_systemd_template_out_dir }}/{{ kubelet_app }}.service.d"
kubelet_systemd_dropin_source_file: 10-kubeadm.conf.j2
kubelet_systemd_dropin_dest_file: 10-kubeadm.conf
kubelet_systemd_service_enable_state: yes
kubelet_systemd_service_state: started
Variables table:
Variable | Description |
---|---|
kubelet_app | Defines the app to install i.e. kubelet |
kubelet_version | Defined to dynamically fetch the desired version to install. Defaults to: 1.31.0 |
kubelet_os | Defines OS type. |
kubelet_architecture_map | Defines os architecture. Used for obtaining the correct type of binaries based on OS System Architecture. |
kubelet_dl_url | Defines URL to download the kubelet binary from. |
kubelet_bin_path | Defined to dynamically set the appropriate path to store kubelet binary into. Defaults to (as generally available on any user's PATH): /usr/local/bin |
kubelet_file_mode | Mode for the binary file of kubelet. |
kubelet_systemd_service_setup | Boolean for whether systemd service setup (systemd service generation, systemd boot start and state change) for kubelet needs to be performed. |
kubelet_systemd_template_out_dir | Destination directory to store the generated Jinja template for kubelet's systemd service. |
kubelet_systemd_template_in_file | Template (Jinja) file to use as source for kubelet's systemd service. |
kubelet_systemd_template_out_file | Destination filename for kubelet's systemd service. |
kubelet_systemd_dropin_dir | Directory to store the systemd drop-in for kubelet. |
kubelet_systemd_dropin_source_file | Source template for kubelet's systemd-dropin. |
kubelet_systemd_dropin_dest_file | Destination filename for kubelet's systemd-dropin. |
kubelet_systemd_service_enable_state | Defined to enable kubelet systemd service at boot. |
kubelet_systemd_service_state | Defined to set the state of the kubelet systemd service |
Dependencies
None
Example Playbook
For default behaviour of role (i.e. installation of kubelet) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.kubelet
For customizing behavior of role (i.e. specifying the desired kubelet version) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.kubelet
vars:
kubelet_version: 1.22.0
For customizing behavior of role (i.e. placing binary of kubelet package in different location) in ansible playbooks.
- hosts: servers
roles:
- darkwizard242.kubelet
vars:
kubelet_bin_path: /bin/
License
Author Information
This role was created by Ali Muhammad
About
Installs/Uninstalls 'kubelet', Node Agent for Kubernetes Cluster.
Install
ansible-galaxy install darkwizard242/ansible-role-kubelet
License
mit
Downloads
2239
Owner
Senior DevOps/CloudOps Engineer.
Dedicated to Automating everything I come across.
Love to work on and learn new technologies/tools everyday!