OpenStack Hosted Control Plane Deployment#
Follow these steps to set up a k0smotron-hosted control plane on OpenStack:
-
Prerequisites
Before proceeding, make sure you have the following:
- A management Kubernetes cluster (Kubernetes v1.28 or later) deployed on OpenStack with Mirantis k0rdent Enterprise installed.
- An OpenStack Cloud Controller Manager installed to manage Services with the
Load Balancer
type. - A default storage class configured on the management cluster to support Persistent Volumes.
- An OpenStack Credential object and resource-template ConfigMap must exist in the namespace where the cluster will be deployed. Refer to steps 4–6 in the OpenStack management cluster preparation guide.
- The name of the existing network and subnet where the worker nodes will be deployed.
- The name of the existing router that will be used to deploy the worker nodes.
- (Optional) The name of the existing security group to attach to the worker nodes.
Important
All control plane components for your hosted cluster will reside in the management cluster, and the management cluster must have sufficient resources to handle these additional workloads.
-
Networking
To deploy a hosted control plane, the necessary OpenStack networking resources must already exist or be created. If you're using the same network, subnet and router as your management cluster, you can reuse these resources.
If your management cluster was deployed using the Cluster API Provider OpenStack (CAPO), you can gather the required networking details using the following commands:
Retrieve the network name:
kubectl -n <cluster-namespace> get openstackcluster <cluster-name> -o go-template='{{.status.network.name}}'
Retrieve the subnet name:
kubectl -n <cluster-namespace> get openstackcluster <cluster-name> -o go-template='{{(index .status.network.subnets 0).name}}'
Retrieve the router name:
kubectl -n <cluster-namespace> get openstackcluster <cluster-name> -o go-template='{{.status.router.name}}'
-
Create the
ClusterDeployment
manifestOnce you've collected all the necessary data, you can create the
ClusterDeployment
manifest. This file tells Mirantis k0rdent Enterprise how to deploy and manage the hosted control plane. For example:You can adjustapiVersion: k0rdent.mirantis.com/v1beta1 kind: ClusterDeployment metadata: name: openstack-hosted-cp spec: template: openstack-hosted-cp-1-0-2 credential: openstack-credential config: workersNumber: 2 flavor: m1.medium image: filter: name: ubuntu-20.04 externalNetwork: filter: name: "public" identityRef: name: "openstack-cloud-config" cloudName: "openstack" region: ${OS_REGION_NAME} network: filter: name: ${NETWORK_NAME} router: filter: name: ${ROUTER_NAME} subnets: - filter: name: ${SUBNET_NAME} ports: - network: filter: name: ${NETWORK_NAME}
flavor
,image name
,region name
,network
,subnet
androuter
configuration to match your OpenStack environment. For more information about the configuration options, see the Template reference for openstack Alternatively, you can generate theClusterDeployment
manifest. To simplify the creation of aClusterDeployment
manifest, you can use the following template, which dynamically inserts the appropriate values:For more information on these and other available parameters, see the Template reference for openstack. Save this template asapiVersion: k0rdent.mirantis.com/v1beta1 kind: ClusterDeployment metadata: name: openstack-hosted spec: template: openstack-hosted-cp-1-0-2 credential: openstack-credential config: workersNumber: 2 flavor: m1.medium image: filter: name: ubuntu-20.04 externalNetwork: filter: name: "public" identityRef: name: "openstack-cloud-config" cloudName: "openstack" region: "{{.spec.identityRef.region}}" network: filter: name: "{{.status.network.name}}" router: filter: name: "{{.status.router.name}}" subnets: - filter: name: "{{(index .status.network.subnets 0).name}}" ports: - network: filter: name: "{{.status.network.name}}"
clusterdeployment.yaml.tpl
, then generate your manifest using the following command:4. Apply the template Nothing actually happens until you apply thekubectl -n <cluster-namespace> get openstackcluster <cluster-name> -o go-template="$(cat clusterdeployment.yaml.tpl)" > clusterdeployment.yaml
ClusterDeployment
manifest to create a new cluster deployment:kubectl apply -f clusterdeployment.yaml -n kcm-system