Role - kubeinit_k8s

Role Documentation

Please, refer to the kubeinit_k8s role official docs for further information.

Role Defaults

This section highlights all of the defaults and variables set within the “kubeinit_k8s” role.

# All variables intended for modification should be placed in this file.

# All variables within this role should have a prefix of "kubeinit_k8s_"
kubeinit_k8s_debug: '{{ (ansible_verbosity | int) >= 2 | bool }}'
kubeinit_k8s_hide_sensitive_logs: true

kubeinit_k8s_kubernetes_version: '1.26'
kubeinit_k8s_kubernetes_version_full: 1.26.3

# This is the default container runtime that
# will be deployed when the Vanila k8s cluster
# is deployed.
# So far, cri-o should be the default option,
# but when testing confidential-containers
# at the moment only containerd will work.
kubeinit_k8s_container_runtime: cri-o
# kubeinit_k8s_container_runtime: "containerd"

kubeinit_k8s_flannel_version: 0.22.0
kubeinit_k8s_flannel_cni_plugin_version: 1.1.2
kubeinit_k8s_flannel_cni_version: 0.3.1


# TODO:FIXME: There must be a bug in the way flannel and cri-o
# is configured. The following parameters can not be changed at the moment.
# This can not be changed, it needs to match
# https://github.com/flannel-io/flannel/blob/796457b0cd4cba2025166f9625330ea905a18033/Documentation/kube-flannel.yml
kubeinit_k8s_pod_network: 10.244.0.0
# This is the cluster CIDR
kubeinit_k8s_pod_network_cidr: 10.244.0.0/16
kubeinit_k8s_pod_subnet_len: 16
# Make sure changes are applied to windows machines
# in the libvirt role in the template PrepareFlannel.ps1.j2

# Cluster CIDR
# kubectl cluster-info dump | grep -m 1 service-cluster-ip-range

# Service CIDR
# kubectl cluster-info dump | grep -m 1 cluster-cidr

Tasks files

This section highlights all the documentation available in the tasks files.

Molecule Scenarios

Molecule is being used to test the “kubeinit_k8s” role. The following section highlights the drivers in service and provides an example playbook showing how the role is leveraged.

Scenario: default

Driver: docker:
Example default playbook
- name: Converge
  hosts: all
  # roles:
  #   - role: "kubeinit_k8s"
  tasks:
  - name: Message for "kubeinit_k8s"
    ansible.builtin.debug:
      msg: Finishing molecule for "kubeinit_k8s"