freehck.k8s_flannel

freehck.k8s_flannel

Deploy the Flannel CNI configuration in Kubernetes (k8s)

Description

This role includes several Flannel CNI configurations, and you can use kubectl apply -f <definition> to deploy one of them. It's recommended that the user is familiar with kubectl and has a properly configured .kube/config file.

I have gathered some Flannel CNI configurations in this role and will update them as needed.

Role Variables

  • k8s_flannel_ver: Version of Flannel to deploy.

  • k8s_flannel_network_pod_cidr: Pod network CIDR, default is 10.244.0.0/16.

  • k8s_flannel_iface: Network interface Flannel will use for communication between nodes.

Example

- hosts: k8s-master
  become: true
  vars:
    # common parameters
    k8s_ver: "1.16.2-00"
    k8s_node_ip: "{{ ansible_host }}"
    k8s_is_master: false
    # k8s_base is a required dependency
    k8s_base_node_ip: "{{ k8s_node_ip }}"
    k8s_base_ver: "{{ k8s_ver }}"
    # k8s_init is a required dependency
    k8s_init_cidr: "192.168.0.0/16"
    k8s_init_node_ip: "{{ ansible_host }}"
    k8s_init_node_name: "{{ inventory_hostname }}"
    # k8s_join is a required dependency
    k8s_join_is_master: "{{ k8s_is_master | default('false') }}"
    # this role configuration
    # k8s_flannel_ver: "v0.11.0"
    k8s_flannel_ver: "master-2019-12-09"
    k8s_flannel_network_pod_cidr: "192.168.0.0/16"
    k8s_flannel_iface: "enp0s8"  # optional, mainly for Vagrant
  roles:
    - role: freehck.k8s_base
    - role: freehck.k8s_init
    - role: freehck.k8s_flannel

Install

You can install this role from Ansible Galaxy:

ansible-galaxy install freehck.k8s_flannel

License

MIT

Author Information

Dmitrii Kashin, freehck@freehck.ru

Informazioni sul progetto

install flannel cni services in k8s

Installa
ansible-galaxy install freehck.k8s_flannel
Licenza
Unknown
Download
154
Proprietario