Skip to content

ops4cloud/ansible-role-crio_k8s

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible-role-crio_k8s

This role will deploy by default CRI-O and kubernetes on a bare metal server

Requirements

  • Ansible >= 2.9

Role Variables

# defaults file for ansible-role-crio_k8s
# crio version tested = 1.20 1.21 1.22.1
crio_major_version: "1.22"
crio_minor_version: "1"
crio_os_distro: "{{ ansible_distribution }}"
crio_os_major_version: "{{ ansible_distribution_major_version }}"
crio_cni: flannel
kubernetes_cni: "{{ crio_cni }}"
kubernetes_cni_network: "10.244.0.0/16"
kubernetes_master: False

Dependencies

  • role: ansible-role-metallb

Example Iventory

[all]
localhost ansible_connection=local

[crio:children]
crio_master
crio_worker

[crio_master]
crio-master kubernetes_master=True
[crio_worker]
crio1
crio2
crio3

Example Playbook

- hosts: crio
  vars:
    #CNI flannel or calico
    kubernetes_cni: flannel
  roles:
    - 
      { role: ansible-role-crio_k8s }
    -
      { role: ansible-role-metallb, when: kubernetes_master }
  post_tasks:
    - name: pull admin config for local kubectl
      synchronize:
        mode: pull
        src: ~/.kube/config
        dest: __$HOME_CHANGE_ME__/.kube/config
      when: kubernetes_master

- hosts: crio_worker
  tasks:
    - name: join cluster
      shell: "{{ hostvars['crio-master'].join_command }} >> node_joined.txt"
      args:
        chdir: $HOME
        creates: node_joined.txt

License

BSD

Author Information

gotoole ops4cloud.fr

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages