K8s Pre Bootstrap

screenshot of K8s Pre Bootstrap

Ansible role to setup Kubernetes Requirements before kubeadm init

Overview

The Kubernetes bootstrapping playbook simplifies the initial setup process for Kubernetes clusters on supported operating systems such as Rocky Linux, AlmaLinux, and CentOS Stream. While it doesn’t provide a complete Kubernetes cluster setup, it automates essential pre-requisites, minimizing the manual configuration workload. This playbook is particularly beneficial for users already running Ansible version 2.10 or higher who seek to efficiently prepare their environments for Kubernetes deployment.

By addressing common tasks like installing necessary packages and configuring system requirements, this playbook streamlines the foundational steps needed before launching a full-fledged Kubernetes cluster. Its automation capabilities allow users to focus on higher-level configurations, ensuring a smoother and faster transition into container orchestration.

Features

  • Supported Operating Systems: Compatible with Rocky Linux 8|9, AlmaLinux 8|9, and CentOS Stream 9, providing flexibility for various environments.

  • Basic Package Installation: Automates the installation of fundamental software packages required for Kubernetes operations, ensuring all dependencies are in place.

  • Standard System Configurations: Handles essential configurations such as disabling Swap, modifying sysctl settings, and disabling SELinux to meet Kubernetes prerequisites.

  • Container Runtime Setup: Offers the ability to install and configure preferred container runtimes like cri-o, Docker, or Containerd, catering to diverse user preferences.

  • Kubernetes Packages Management: Automatically installs key Kubernetes components including kubelet, kubeadm, and kubectl for easy cluster management.

  • Firewalld Configuration: Adjusts Firewalld settings on Kubernetes Master and Worker nodes for versions prior to 1.19, enhancing network security and communication.

  • Flexible Playbook Execution: Supports execution as root or sudo users, with options for SSH key or password authentication, providing versatile deployment methods.

  • Error Checking: Includes verification steps to ensure the playbook runs without errors, promoting accuracy and reliability in the setup process.