Skip to main content
Version: 3.0

Create a cluster

note

USB storage devices are blocked by default. If you need to access USB devices, set the tuning option cubesys.probeusb to true using CLI > tuning > configure after logging in as admin.

Prerequisites​

note

User bigstack-k8s and project bigstack-k8s will be used during this demonstration.

  1. A project for Kubernetes has been created, and your Kubernetes permissions have been set to Administrator. See Create a project.

  2. An Amphora image has been imported.

    1. Download the Amphora image: amphora-x64-haproxy_yoga.
    2. Use scp to upload the downloaded image to the Glance image directory /mnt/cephfs/glance.
      1. From a computer with management access to your cluster VIP, run: scp amphora-x64-haproxy_yoga.qcow2 root@<cluster-vip>:/mnt/cephfs/glance/
    3. Log in to the admin shell.
    4. Run the following command to import the load balancer image:
Admin shell
cc1> iaas image import_lb
1: usb
2: local
Enter index: 2
1: amphora-x64-haproxy_yoga.qcow2
Enter index: 1
Importing...
[16:25:04] Converting image to RAW format ...
(100.00/100%)
[16:25:11] Creating image amphora-x64-haproxy ...
[=============================>] 100%
aa93010b-eb36-4357-b1cf-fea46958908f
[16:26:07] Finished creating image amphora-x64-haproxy
Importing complete. It is safe to remove the local image file.
  1. A Linux image has been imported and is ready for use in deployments.
note

For this demonstration, you'll use the ubuntu2404.qcow2 image as the base system image.

  1. Visit the CubeCOS Downloads page to obtain a supported image (for example, ubuntu2404.qcow2).
  2. Use scp to transfer the image to the Glance image store at /mnt/cephfs/glance.
    1. From a workstation or jump host with network access to your cluster VIP, run: scp ubuntu2404.qcow2 root@<cluster-vip>:/mnt/cephfs/glance/
  3. Log in to the admin shell.
  4. Run the following command to import the image:
Admin shell
cc1> iaas image import
1: usb
2: local
Enter index: 2
1: amphora-x64-haproxy_yoga.qcow2
2: ubuntu2404.qcow2
Enter index: 2
Specify image name: ubuntu_2404
Select domain:
1: default
Enter index: 1
Select tenant:
1: admin
2: bigstack-k8s
Enter index: 1
Bootable image or volume:
1: glance-images
2: cinder-volumes
Enter index: 1
Visibility:
1: public
2: private
Enter index: 1
Importing...
[16:29:57] Converting image to RAW format ...
(100.00/100%)
[16:30:09] Creating image ubuntu_2404 ...
[=============================>] 100%
ebfa199b-12d2-4a7c-8a8e-aef452f71750
[16:31:39] Finished creating image ubuntu_2404
Importing ubuntu_2404 complete. It is safe to remove the local image file.

Configure the OpenStack driver and cloud credential​

  1. Log in to Rancher with the keycloak user bigstack-k8s.

    Rancher login screen for user bigstack-k8s

  2. Go to Cluster Management.

    Cluster Management page in Rancher

  3. Go to Drivers.

    Drivers page in Rancher

  4. Switch to the Node Drivers tab.

    Node Drivers tab highlighted

  5. Select OpenStack and choose Active from its action options.

    OpenStack driver selected with Active option

  6. Confirm the State column shows Active.

    OpenStack driver state set to Active

  7. Go to Cloud Credentials.

    Cloud Credentials page in Rancher

  8. In the top right corner, click Create.

    Create button on Cloud Credentials page

  9. Choose OpenStack as the cloud credential template.

    OpenStack template selected for cloud credentials

  10. Fill in the username as Cloud Credential Name and the user password as the password value, then click Create.

    Cloud credential form filled with username and password

Create the cluster​

  1. Return to the Rancher home page and click Create.

    Cluster creation button on Rancher home page

  2. Click OpenStack.

    OpenStack provider selected for cluster creation

  3. Fill in the following cluster information:

    • Cluster Name: Any name
    • OpenStack Active Timeout: 200
    • OpenStack Authentication URL: http://<CUBECOS-VIP>:5000/v3
    • OpenStack Endpoint Type: publicURL
    • OpenStack Flavor Name: t2.medium or above (recommended)
    • OpenStack Image Name: ubuntu_2404
    • Disable TLS Credential Checking: Enabled
    • OpenStack Version of IP Address: 4
    • OpenStack Network ID: private-k8s (from project bigstack-k8s)
    • OpenStack Security Groups: default, default-k8s
    • OpenStack SSH Port: 22
    • OpenStack SSH User: ubuntu
    • OpenStack Tenant ID: ID for project bigstack-k8s
    • OpenStack User ID: ID for user bigstack-k8s

    Cluster configuration form with OpenStack settings

  4. Change the container network to cilium, then click Create.

    Container network set to cilium on cluster creation form

  5. Wait until the cluster state changes to Active.

    Cluster details page showing cluster status Cluster Active state confirmation