...
The construction of the cluster is driven by values found in ../../contrib/terraform/openstack/
variables.tf
. You can consult this file to find out which variables are available for configuration, accompanied by a brief description, which values they accept and their defaults. For your cluster, edit cluster.tfvars
.cluster.tfvars
. Let's take a look at some parameters in this file, which can serve as an example
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# list of availability zones available in your OpenStack cluster
az_list = ["nova"]
# SSH key to use for access to nodes
public_key_path = "/home/centos/.ssh/id_rsa.pub"
# image to use for bastion, masters, standalone etcd instances, and nodes
image = "centos-8-CNAF-x86_64"
# standalone etcds
number_of_etcd = 0
# masters
number_of_k8s_masters = 1
number_of_k8s_masters_no_etcd = 0
number_of_k8s_masters_no_floating_ip = 0
number_of_k8s_masters_no_floating_ip_no_etcd = 0
flavor_k8s_master = "23e53bd6-be2f-4802-8126-3d7b367468f0"
# networking
router_id = "dec41a75-f1e1-4ec2-8c6a-bd87eb283bcc" # It is possible to use an existing router instead of creating one
network_name = "network-02"
external_net = "ac57f9a8-4349-4185-8d66-341d1b30a1bd"
subnet_cidr = "192.168.102.0/24"
floatingip_pool = "public"
master_allowed_remote_ips = ["192.168.0.0/16"]
k8s_allowed_remote_ips = ["192.168.0.0/16"] |
Note that the Ansible script will report an invalid configuration if you wind up with an even number of etcd instances since that is not a valid configuration. This restriction includes standalone etcd nodes that are deployed in a cluster along with master nodes with etcd replicas. As an example, if you have three master nodes with etcd replicas and three standalone etcd nodes, the script will fail since there are now six total etcd replicas. Moreover, You can force your existing FIPs by modifying the compute variables in ../../contrib/terraform/openstack/
kubespray.tf
as follows
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
k8s_master_fips = ["151.101.129.67"]
k8s_node_fips = ["151.101.129.68"] |
Provisioning VMs
Initialization
...