Skip to content

Create k8s Clusters

Create Cloud Credentials

Using the UI

  • Access Rancher at https://rancher.virtomat.net and log in with your Cluster Owner account.
  • Go to Cluster ManagementCloud CredentialsAdd Cloud Credential
  • Select OpenStack from the list.
  • Fill in the fields using your Openstack project-scoped API key, and Save.
    (How to create an Openstack API Key)
Field Value
Auth URL: https://cloud.virtomat.net:5000
Identity API Version: 3
Region Name: RegionOne
Application Credential ID: 45f05795effe4248843323472149e473
Application Credential Secret: S7GGiTF2QCLUFRa1CmBHlLw-g8F9srAL60wuqB4qqs9C5KM60av...

Warning

Can't do it (don't know) using UI, so try using the API.
Might work by uploading the cloud.yaml file downloaded from Openstack.

Using the API

First, we need to create an API key for the user (using the Rancher API requires an api key):
(If you already have an API key for this user account, you can skip this step)

  • Select User Profile button (top right of the screen)
  • Select Account & API Keys
  • Create API Key
    • Description: Jane Doe account api key
    • Scope: No Scope
    • Automatically expire: 90 days
Response API Key

Access Key: token-kd552
Secret Key: gs775k4njqgbp6df79jhj42hr7mj94h44j88snx2lcr5dxf79tbvwp
Bearer Token: token-kd552:gs775k4njqgbp6df79jhj42hr7mj94h44j88snx2lcr5dxf79tbvwp

Using the received token you can now place a request like this:

curl -k -X POST \
  "https://rancher.virtomat.net/v3/cloudcredentials" \
  -H "Authorization: Bearer token-w44pt:p6kdvzcfsp6t7qh68rr6jf4gq48p28lgc7lhcgnbs7j9jqdbndg5bc" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "cloudCredential",
    "openstackcredentialConfig": {
      "authUrl": "https://cloud.virtomat.net:5000/v3",
      "applicationCredentialId": "45f05795effe4248843323472149e473",
      "applicationCredentialSecret": "S7GGiTF2QCLUFRa1CmBHlLw-g8F9srAL60wuqB4qqs9C5KM60avZ_oTBgPd20Dlx6qAw_8c1qe3vOjKn5CZ04w",
      "region": "RegionOne"
    }
  }'

Create K3S cluster (single node)

Warning

At this point please make sure the user has a local network created (called local-net)
How to create a local network

  • Go to Cluster ManagementCreate
  • Provision new nodes and create a cluster using RKE2/K3s
  • Select Openstack

Cloud Credential: cc-h94nf (same id from cloud credentials section)
Cluster Name: test-cluster-k3s (choose a name)

Machine Pools

Field Value OpenStack Command to Retrieve
Pool Name k3s-single-node N/A
Machine Count 1 N/A
Roles Control Plane, etcd, Worker N/A
applicationCredentialId c2ecf1699ac4437f929eea79a67...
applicationCredentialSecret ZpvCh-q94QBsKRRYudVyqA2od6A...
authUrl https://cloud.virtomat.net:5000/v3 N/A
region RegionOne openstack region list
flavorName m1.medium openstack flavor list
imageName ubuntu-22.04 openstack image list
netName local-net openstack network list
secGroups default openstack security group list
floatingipPool office openstack network list --external

Warning

It seems that applicationCredentialId and applicationCredentialSecret still required here even when already set in cloud credential

Cluster Configuration

  • Basics → Kubernetes Version: v1.30.9+k3s1
  • Security: None
  • System Services: all (default)

Create RKE2 cluster (multi node)

🗒 TODO: Add any particular configurations