kubernetes.adm.prepare role – Prepare node for Kubernetes installtion

Note

This role is part of the kubernetes.adm collection (version 1.0.0).

To install it use: ansible-galaxy collection install kubernetes.adm.

To use it in a playbook, specify: kubernetes.adm.prepare.

Entry point main – Prepare node for Kubernetes installtion

Synopsis

  • Ensure that the node has the desired swap state, kernel modules and kernel parameters.

  • Configure the required repositories for the container runtime and Kubernetes.

  • Install the container runtime.

  • Install Kubernetes packages

  • Install kubernetes.core and its requirements on control plane nodes.

Parameters

Parameter

Comments

cni_tasks

string

Tasks file for preparing the OS for CNI.

Default: "_cni.yml"

complete_alias

boolean

Add complete_alias from github.com/cykerway/complete-alias

Choices:

  • false

  • true ← (default)

completion_tasks

string

Tasks file for installing shell completion.

Default: "_completion.yml"

containerd_version

string

The containerd package version.

cri

string

The container runtime.

Choices:

  • "containerd" ← (default)

  • "cri-o"

cri_tasks

string

Tasks file for preparing and installing the container runtime.

crio_os

string

Used in setting up the CRI-O YUM repository. On CentOS 8 it would be ‘CentOS_8’.

crio_version

string

The CRI-O version to install/upgrade.

Default: "Kubernetes MAJOR.MINOR from kubernetes_version"

kubectl_aliases

boolean

Add kubectl aliases from github.com/ahmetb/kubectl-aliases

Choices:

  • false

  • true ← (default)

kubens_command

boolean

Add kubens shell script to switch between namespaces.

Choices:

  • false

  • true ← (default)

no_yum_repo

boolean

When true, no YUM reposioiry will be added.

Choices:

  • false ← (default)

  • true

prepare_upgrade

boolean

Only relevent if there is an existing installtion of the CR or Kubernetes packages.

When true, the CR and Kubernetes will upgraded/downgraded to {{ kubernetes_version }}.

Should only by used when initializing a new cluster.

Choices:

  • false ← (default)

  • true

swap_state

string

Whether to disable or enable swap.

Attempts to undo a previous execution of swap_state=disabled will not create a new swap partition or file.

Choices:

  • "enabled"

  • "disabled" ← (default)

swap_tasks

string

Tasks file for swap memory.

Default: "_swap.yml"