jedimt.kubernetes_prep

Ansible Role: Kubernetes Preparation

This role sets up Ubuntu hosts to be ready for a Kubernetes cluster.

Requirements

No special requirements.

Role Variables

To choose the version of Kubernetes, you can use apt-cache to see the available releases. For example, you can find all versions of Kubernetes 1.25 with this command: apt-cache madison kubeadm | grep 1.25.

Here are some variables you can set:

  • Kubernetes version to install:
    k8sversion: "1.25.6-00"

  • Docker GPG key URL (needed for containerd):
    docker_gpg_url: "https://download.docker.com/linux/ubuntu/gpg"

  • Kubernetes GPG key URL:
    k8s_gpg_url: "https://packages.cloud.google.com/apt/doc/apt-key.gpg"

Dependencies

No dependencies required.

Example Playbook

Here’s an example playbook showing how to use this role:

# ===========================================================================
# Kubernetes pre-install tasks
# ===========================================================================
- name: Kubernetes pre-install tasks
  hosts: servers
  tags: k8s

  vars_files:
    # File containing all necessary passwords
    - "../../credentials.yml"

  roles:
    - jedimt.kubernetes_prep

License

MIT License.

Author Information

Aaron Patten
aaronpatten@gmail.com

Informazioni sul progetto

Prepare hosts for Kubernetes install

Installa
ansible-galaxy install jedimt.kubernetes_prep
Licenza
mit
Download
137
Proprietario