Setting Up the Oracle Linux Virtualization Manager Provider

Set up a system to create a Kubernetes cluster on Oracle Linux Virtualization Manager using the olvm provider.

To create a Kubernetes cluster on Oracle Linux Virtualization Manager, you need to set up the credentials to connect to an existing instance of Oracle Linux Virtualization Manager. You must also provide the location of a kubeconfig file for an existing Kubernetes cluster, or prepare the localhost to create an ephemeral cluster using the libvirt provider. The ephemeral cluster starts the Kubernetes Cluster API services used to create a cluster on Oracle Linux Virtualization Manager.

  1. Set environment variables.

    The following environment variables must be set to provide OAuth 2.0 connection information about the Oracle Linux Virtualization Manager instance:

    • OCNE_OLVM_USERNAME: The username. The username must have @internal suffix. For example, if you sign in to the Oracle Linux Virtualization Manager console using the admin user, set this to admin@internal.

    • OCNE_OLVM_PASSWORD: The password for the user.

    • OCNE_OLVM_SCOPE: The authorization scope. Set this to ovirt-app-api, unless the user has a non default scope.

    For more information about OAuth 2.0, see the OAuth upstream documentation.

    For example:

    export OCNE_OLVM_USERNAME=admin@internal
    export OCNE_OLVM_PASSWORD=password
    export OCNE_OLVM_SCOPE=ovirt-app-api
  2. Obtain the CA Certificate.

    You need to provide the CA Certificate to generate a key pair to connect to Oracle Linux Virtualization Manager. Save the CA Certificate on the localhost. Ensure you only use the second certificate returned by the instructions at oVirt CA.

    For example, to use wget to pull the CA Certificate in a file named ca.crt:
    wget --output-document ca.crt https://fqdn/ovirt-engine/services/pki-resource?resource=ca-certificate&format=X509-PEM-CA

    Replace fqdn with the fully qualified domain name (FQDN) of the Oracle Linux Virtualization Manager instance.

  3. (Optional) Set the location of the kubeconfig file for an existing cluster.

    A Kubernetes cluster is required to perform some steps. You can use an existing cluster for this purpose by setting the location of the kubeconfig file.

    You can set this using the KUBECONFIG environment variable, or using the --kubeconfig option with ocne commands. You could also set this in a configuration file.

    If you don't set the location of the kubeconfig file, an ephemeral cluster is created using the libvirt provider when required.

  4. (Optional) Set up the libvirt provider.

    If you don't set the location of an existing Kubernetes cluster, set up the localhost to provision ephemeral clusters using the libvirt provider. For information on setting up the libvirt provider, see Setting Up the libvirt Provider.