Skip to content

An Ansible Role to Bootstrap Kubernetes on BareMetal/Virtual Machines

License

Notifications You must be signed in to change notification settings

Richard-Barrett/bootstrap-kubernetes

Repository files navigation

Ansible Role: system.bootstrap_kubernetes

Ansible Lint CodeQL Molecule Test Trivy Scan

  • Description: An Ansible Role to Bootstrap Kubernetes on BareMetal/Virtual Machines

  • Overview: An Ansible role to install Kubernetes across various operating systems and CPU architectures in a controlled, versioned manner with configurable CNI plugins.

Requirements

  • Ansible 2.9+
  • Supported OS:
    • Ubuntu (focal, bionic, jammy)
    • Debian (buster, bullseye)
    • CentOS/RHEL (7, 8, 9)
    • SUSE (openSUSE Leap 15.x, SLES 12-SP5, 15-SPx, Tumbleweed)
  • Supported Architectures:
    • x86_64
    • arm64

Role Variables

Variable Default Description
kubernetes_version 1.26.0 Kubernetes version to install
cni_plugin calico CNI plugin to use (calico, flannel, weave)
pod_network_cidr 192.168.0.0/16 Pod network CIDR (adjust based on CNI requirements)
k8s_admin_user {{ ansible_user }} User to configure kube config
supported_architectures ["x86_64", "arm64"] List of supported CPU architectures
arch_packages See below Mapping of architectures to Kubernetes package names

arch_packages Structure

arch_packages:
  x86_64:
    kubelet: "kubelet-{{ kubernetes_version }}"
    kubeadm: "kubeadm-{{ kubernetes_version }}"
    kubectl: "kubectl-{{ kubernetes_version }}"
  arm64:
    kubelet: "kubelet-{{ kubernetes_version }}"
    kubeadm: "kubeadm-{{ kubernetes_version }}"
    kubectl: "kubectl-{{ kubernetes_version }}"

About

An Ansible Role to Bootstrap Kubernetes on BareMetal/Virtual Machines

Resources

License

Stars

Watchers

Forks

Packages

No packages published