Skip to content

Instantly share code, notes, and snippets.

@HauptJ
Last active January 21, 2026 00:38
Show Gist options
  • Select an option

  • Save HauptJ/d72e2a8fe0698d448283a51e847a5dfa to your computer and use it in GitHub Desktop.

Select an option

Save HauptJ/d72e2a8fe0698d448283a51e847a5dfa to your computer and use it in GitHub Desktop.
KubeSpray cluster.tfvars for OpenStack with Master and all Nodes with floating IPs
# your Kubernetes cluster name here
cluster_name = "test-cluster"
# list of availability zones available in your OpenStack cluster
#az_list = ["nova"]
# SSH key to use for access to nodes
public_key_path = "~/.ssh/.pub"
# image to use for bastion, masters, standalone etcd instances, and nodes
image = "Ubuntu 24.04"
# user on the node (ex. core on Container Linux, ubuntu on Ubuntu, etc.)
ssh_user = "ubuntu"
group_vars_path="/home/josh/dev/lab1/kubespray/inventory/test-cluster1/group_vars"
# 0|1 bastion nodes
number_of_bastions = 0
#flavor_bastion = "<UUID>"
# 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 = "dfc74d9b-e26b-4c07-a038-91e154041577"
k8s_masters = {
# "master-1" = {
# "az" = "nova"
# "flavor" = "<UUID>"
# "floating_ip" = true
# "etcd" = true
# },
# "master-2" = {
# "az" = "nova"
# "flavor" = "<UUID>"
# "floating_ip" = false
# "etcd" = true
# },
# "master-3" = {
# "az" = "nova"
# "flavor" = "<UUID>"
# "floating_ip" = true
# "etcd" = true
# },
}
# nodes
number_of_k8s_nodes = 3
number_of_k8s_nodes_no_floating_ip = 0
flavor_k8s_node = "dfc74d9b-e26b-4c07-a038-91e154041577"
# GlusterFS
# either 0 or more than one
#number_of_gfs_nodes_no_floating_ip = 0
#gfs_volume_size_in_gb = 150
# Container Linux does not support GlusterFS
image_gfs = "Ubuntu 24.04"
# May be different from other nodes
#ssh_user_gfs = "ubuntu"
#flavor_gfs_node = "dfc74d9b-e26b-4c07-a038-91e154041577"
# networking
network_name = "test-cluster"
dns_nameservers = ["8.8.8.8", "8.8.4.4"]
master_allowed_remote_ips = ["/32"]
#master_allowed_remote_ipv6_ips = ["::/48"]
master_allowed_ports = [{ "protocol" = "tcp", "port_range_min" = 6443, "port_range_max" = 6443, "remote_ip_prefix" = "0.0.0.0/0" }, { "protocol" = "tcp", "port_range_min" = 2379, "port_range_max" = 2379 , "remote_ip_prefix" = "0.0.0.0/0"}, { "protocol" = "icmp", "port_range_min" = 0, "port_range_max" = 0, "remote_ip_prefix" = "0.0.0.0/0"}]
#master_allowed_ports_ipv6 = [{ "protocol" = "tcp", "port_range_min" = 6443, "port_range_max" = 6443, "remote_ip_prefix" = "::/0" }, { "protocol" = "tcp", "port_range_min" = 2379, "port_range_max" = 2379 , "remote_ip_prefix" = "::/0"}, { "protocol" = "ipv6-icmp", "port_range_min" = 0, "port_range_max" = 0, "remote_ip_prefix" = "::/0"}]
worker_allowed_ports = [{ "protocol" = "tcp", "port_range_min" = 30000, "port_range_max" = 32767, "remote_ip_prefix" = "0.0.0.0/0"}, { "protocol" = "tcp", "port_range_min" = 2379, "port_range_max" = 2379, "remote_ip_prefix" = "0.0.0.0/0"}, { "protocol" = "icmp", "port_range_min" = 0, "port_range_max" = 0, "remote_ip_prefix" = "0.0.0.0/0"}]
#worker_allowed_ports_ipv6 = [{ "protocol" = "tcp", "port_range_min" = 30000, "port_range_max" = 32767, "remote_ip_prefix" = "::/0"}, { "protocol" = "tcp", "port_range_min" = 2379, "port_range_max" = 2379, "remote_ip_prefix" = "::/0"}, { "protocol" = "ipv6-icmp", "port_range_min" = 0, "port_range_max" = 0, "remote_ip_prefix" = "::/0"}]
k8s_allowed_remote_ips = ["/32"]
k8s_allowed_remote_ips_ipv6 = ["::/48"]
# Use a existing network with the name of network_name. Set to false to create a network with name of network_name.
# use_existing_network = true
# The value below is OVH BHS5 Specific
external_net = "d7eaf2f8-d9d8-465b-9244-fd4736660570"
subnet_cidr = "172.29.0.0/25"
# The value below is OVH Specific
floatingip_pool = "Ext-Net"
bastion_allowed_remote_ips = ["0.0.0.0/0"]
# Force port security to be null. Some cloud providers do not allow to set port security.
# force_null_port_security = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment