KubeOne can create the control plane VMs on OpenStack itself, so you don’t have to create them with Terraform. kube-apiserver is exposed through an Octavia load balancer.
When controlPlane.nodeSets is set together with cloudProvider.openstack.controlPlane, kubeone apply:
apiEndpoint from its VIP address.Unlike the other providers, KubeOne doesn’t create the Octavia load balancer on OpenStack. The load balancer, its
TCP listener on port 6443, a pool and a health monitor must exist before you run kubeone apply.
The openstack-managed-control-plane Terraform configs create the network, subnet, router, security
group, a bastion host and the Octavia load balancer, but no control plane VMs:
cluster_name variable to the KubeOne cluster name. The load balancer is then named
<CLUSTER_NAME>-kube-apiserver, which is the KubeOne default. Otherwise, set loadBalancer.name to the
loadbalancer.name Terraform output.bastion Terraform output as ssh.bastion, ssh.bastionPort and
ssh.bastionUser of the nodeSets.vm and networking Terraform outputs for image, network, subnet and securityGroups in
cloudProviderSpec. Set the subnet by ID, because KubeOne adds the control plane VMs on this subnet to the load
balancer pool.The API endpoint is the private VIP of the load balancer. KubeOne connects to kube-apiserver through an SSH tunnel. To
reach the cluster from outside the network, use kubeone proxy.
KubeOne reads OpenStack credentials from the standard OS_* environment variables or from the credentials file.
Password authentication and application credentials are both supported.
Password authentication:
| Variable | Required | Description |
|---|---|---|
OS_AUTH_URL | Yes | Identity service endpoint, e.g. https://identity.example.com/v3 |
OS_USERNAME | Yes | Username |
OS_PASSWORD | Yes | Password |
OS_DOMAIN_NAME | Yes | Domain name |
OS_TENANT_NAME | No | Project name |
OS_TENANT_ID | No | Project ID |
OS_REGION_NAME | Yes | Region of the load balancer and compute services |
Application credentials:
| Variable | Required | Description |
|---|---|---|
OS_AUTH_URL | Yes | Identity service endpoint |
OS_APPLICATION_CREDENTIAL_ID | Yes | Application credential ID |
OS_APPLICATION_CREDENTIAL_SECRET | Yes | Application credential secret |
OS_REGION_NAME | Yes | Region of the load balancer and compute services |
apiVersion: kubeone.k8c.io/v1beta2
kind: KubeOneCluster
name: my-cluster
versions:
kubernetes: 1.36.2
cloudProvider:
external: true
openstack:
controlPlane:
loadBalancer:
# Name of the existing Octavia load balancer.
# Default: "<CLUSTER_NAME>-kube-apiserver"
name: my-cluster-kube-apiserver
# ID of the Octavia pool. If empty, KubeOne finds the pool
# of the load balancer.
# poolID: ""
controlPlane:
nodeSets:
- name: cp
replicas: 3
operatingSystem: ubuntu
ssh:
publicKeys:
- ssh-ed25519 AAAA...
username: ubuntu
# The `bastion` Terraform output
bastion: 203.0.113.20
bastionPort: 22
bastionUser: ubuntu
cloudProviderSpec:
image: ubuntu-24.04
flavor: m1.small
# IDs from the `networking` Terraform output
network: 6c4c2a0b-...
subnet: 0d1f6a2e-...
securityGroups:
- my-cluster
configDrive: false
The cloudProviderSpec is the machine-controller OpenStack provider spec.
| Field | Default | Description |
|---|---|---|
name | <CLUSTER_NAME>-kube-apiserver | Name of the existing Octavia load balancer |
poolID | empty | ID of the Octavia pool. If empty, KubeOne lists the pools of the load balancer and uses the first one |
During kubeone apply, KubeOne:
apiEndpoint.host.poolID is set.If apiEndpoint is already known from a previous run, KubeOne skips the lookup.
kubeone apply --manifest kubeone.yaml --credentials credentials.yaml
kubeone reset --manifest kubeone.yaml --credentials credentials.yaml \
--destroy-control-plane \
--destroy-control-plane-load-balancer
--destroy-control-plane deletes the control plane VMs.
--destroy-control-plane-load-balancer deletes the Octavia load balancer with its listeners and pools (cascade delete),
even though Terraform created it. If you manage the load balancer with Terraform, omit this flag and run terraform destroy instead.