Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before using KS, some preliminary steps are required. Obviously the first thing is to create on OpenStack the VMs (you can automate this with TerraForm), that will be part of the cluster, and a VM, which we will call ServerAnsible (henceforth SA) and that it will have Ansible installed on it, from which to implement it. Communication via SSH from SA to other machines must be allowed. For example, you can create a key pair with the ssh-keygen command, depositing the private part on the SA and the public part on the cluster VMs. It is advisable to perform at least one access test between the SA and the other VMs, both for a connection test and to automatically register the VMs in the $HOME/.ssh/known_hosts file.

...

Code Block
languageyml
titlehosts.yaml
collapsetrue
all:
  hosts:
    node1:
      ansible_host: 192.168.100.1
      ip: 192.168.100.1
      access_ip: 192.168.100.1
    node2:
      ansible_host: 192.168.100.2
      ip: 192.168.100.2
      access_ip: 192.168.100.2
    node3:
      ansible_host: 192.168.100.3
      ip: 192.168.100.23
      access_ip: 192.168.100.23
    node4:
      ansible_host: 192.168.100.4
      ip: 192.168.100.4
      access_ip: 192.168.100.4
    node5:
      ansible_host: 192.168.100.5
      ip: 192.168.100.5
      access_ip: 192.168.100.5
    node6:
      ansible_host: 192.168.100.6
      ip: 192.168.100.6
      access_ip: 192.168.100.6
  children:
    kube-master:
      hosts:
        node1:
    kube-node:
      hosts:
        node1:
        node2:
        node3:
    etcd:
      hosts:
        node4:
        node5:
        node6:
    k8s-cluster:
      children:
        kube-master:
        kube-node:
        etcd:
    calico-rr:
      hosts: {}

It is divided into 2 parts: the first lists the IPs of the hosts, the second shows the role that each of them will have to assume within the k8s cluster. The second part, in turn, is composed of 3 groups:

...