Skip to content

OpenStack Machine parameters#

ClusterDeployment Parameters#

To deploy an OpenStack cluster, the following are the primary parameters in the ClusterDeployment resource:

Parameter Example Description
.spec.credential openstack-cluster-identity-cred Reference to the Credential object.
.spec.template openstack-standalone-cp-0-2-2 Reference to the ClusterTemplate.
.spec.config.authURL https://keystone.yourorg.net/ Keystone authentication endpoint for OpenStack.
.spec.config.controlPlaneNumber 3 Number of control plane nodes.
.spec.config.workersNumber 2 Number of worker nodes.
.spec.config.clusterLabels k0rdent: demo Labels to apply to the cluster. Used by MultiClusterService.
.spec.config.ccmRegional true Enables the OpenStack CCM OS_CCM_REGIONAL envvar feature and allows OpenStack CCM to define the region in nodes

SSH Configuration#

To access deployed machines over ssh requires two things:

  • sshKeyName - the reference name for an existing SSH key configured in OpenStack.
  • bastion - bastion host being enabled and its flavor and image specified.

SSH keys#

Specify the SSH public key using the .spec.config.controlPlane.sshKeyName and .spec.config.worker.sshKeyName parameters (for the standalone control plane).

Bastion#

Specify .spec.config.bastion.enabled to enable it as well as provide sshKeyName, flavor and image in .spec.config.bastion.spec, similarly to workers and control plane.

Example `ClusterDeployment with enabled bastion can be found below.

Machine Configuration#

Configurations for control plane and worker nodes are specified separately under .spec.config.controlPlane and .spec.config.worker:

Parameter Example Description
flavor m1.medium OpenStack flavor for the instance.
image.filter.name ubuntu-22.04-x86_64 Name of the image.
sshKeyName ramesses-pk Reference name for an existing SSH key.
securityGroups[].filter.name default Security group for the instance.

Note

Make sure .spec.credential references the Credential object. The recommended minimum vCPU value for the control plane flavor is 2, while for the worker node flavor, it is 1. For detailed information, refer to the machine-flavor CAPI docs.

External Network Configuration#

If your OpenStack cloud contains more than one network marked as external it is necessary to provide which one clusterapi should use when creating a cluster. You do this by providing .spec.config.externlNetwork.filter.name value with the name of your external network.

Load Balancer Configuration#

If your user doesn't have access to or your cloud doesn't utilize octavia load balancer it is possible to disable usage of it by specifying .spec.config.apiServerLoadBalancer.enabled as false.

Warning

Disabling loadbalancer blocks usage of LoadBalancer type services in cluster until one is manually installed.

Example ClusterDeployment#

apiVersion: k0rdent.mirantis.com/v1alpha1
kind: ClusterDeployment
metadata:
  name: my-openstack-cluster-deployment
  namespace: kcm-system
spec:
  template: openstack-standalone-cp-0-2-2
  credential: openstack-cluster-identity-cred
  config:
    clusterLabels:
      k0rdent: demo
    controlPlaneNumber: 1
    workersNumber: 1
    bastion:
      enabled: true
      spec:
        sshKeyName: my-public-key
        flavor: m1.small
        image:
          filter:
            name: ubuntu-22.04-x86_64
    controlPlane:
      sshKeyName: bastion-public-key
      flavor: m1.medium
      image:
        filter:
          name: ubuntu-22.04-x86_64
    worker:
      sshKeyName: bastion-public-key
      flavor: m1.medium
      image:
        filter:
          name: ubuntu-22.04-x86_64
    externalNetwork:
      filter:
        name: "public"
    authURL: https://my-keystone-openstack-url.com
    identityRef:
      name: openstack-cloud-config
      cloudName: openstack
      region: RegionOne