Prepare the Release 2 Configuration

Set up the configuration for an Oracle CNE Release 2 cluster.

Setting Up OCI

Set up OCI to perform an upgrade.

Create an Object Storage bucket, and gather OCIDs.

  1. Create an Object Storage bucket.

    Create an Object Storage bucket in OCI. The default bucket name is ocne-images. If you use a different name, ensure you set this in the cluster configuration file.

    For information on creating an Object Storage bucket, see the Oracle Cloud Infrastructure documentation.

  2. Identify OCIDs.

    Identify OCIDs for the following resources:

    • The compartment in which to deploy resources.

    • The Object Storage bucket.

Creating a Cluster Configuration File

Create a cluster configuration file to match the configuration of the Release 1 cluster. Ensure you include any custom configuration identified in OS Customizations. The options you set must match the Release 1 cluster, for example, the cluster name must be the same.

  1. Create a cluster configuration file.

    The minimum configuration required is:

    provider: byo
    name: cluster_name
    kubernetesVersion: kube_version
    loadBalancer: ip_address
    providers:
      byo:
        networkInterface: nic_name

    For information on what can be included in a cluster configuration file, see Oracle Cloud Native Environment: Kubernetes Clusters.

    For example:

    provider: byo
    name: mycluster
    kubernetesVersion: 1.29
    loadBalancer: 192.0.2.100
    providers:
      byo:
        networkInterface: enp1s0
  2. Add extra configuration.

    If the source cluster includes the OCI Cloud Controller Manager Module, include the following in the cluster configuration file.

    extraIgnitionInline: |
      variant: fcos
      version: 1.5.0
      systemd:
        units:
          - name: iscsid.service
            enabled: true

Creating an OCK Image

Before you begin, identify the version of Kubernetes running in the Oracle CNE Release 1 cluster. Also identify the compute instance architecture type.

  1. Create an OCK image.

    Create an OCK image that includes the version of Kubernetes in the Oracle CNE Release 1 cluster.

    Use the ocne image create command to create an OCK image. The syntax is:

    ocne image create 
    {-a|--arch} arch
    [{-t|--type} provider]
    [{-v|--version} version]

    For more information on the syntax options, see Oracle Cloud Native Environment: CLI.

    For example, for Kubernetes Release 1.29 on 64-bit x86 servers:

    ocne image create --type oci --arch amd64 --version 1.29

    This command might take some time to complete. The OCK image is saved to the $HOME/.ocne/images/ directory.

  2. Upload the OCK image to OCI.

    Use the ocne image upload command to upload the image to OCI. The syntax is:

    ocne image upload 
    {-a|--arch} arch
    [{-b|--bucket} name]
    [{-c|--compartment} name]
    [--config path]
    [{-d|--destination} path]
    {-f|--file} path
    {-i|--image-name} name 
    {-t|--type} provider
    {-v|--version} version

    For more information on the syntax options, see Oracle Cloud Native Environment: CLI.

    For example:

    ocne image upload --type oci --compartment compartment_OCID --bucket bucket_OCID --file $HOME/.ocne/images/boot.qcow2-1.29-amd64.oci --image-name ocne129 --arch amd64 --version 1.29
    The image is uploaded to the Object Bucket store, and then automatically converted to a custom compute image.

    Tip:

    Sign in to the OCI console to monitor the upload of the image to the Object Bucket store, and the creation of a custom compute image.

Creating Ignition Files

In Release 2, Ignition files are needed to join a node to a Kubernetes cluster. The settings in an Ignition file differ for control plane and worker nodes, so create an Ignition file for each of the types. You include the content of the Ignition files when you replace the boot volume for the OCI instance.

  1. Set the location of the kubeconfig file.
    Set the kubeconfig file as the KUBECONFIG environment variable. This must be set to the Release 1 cluster. For example:
    export KUBECONFIG=~/.kube/kubeconfig.mycluster
  2. Generate the Ignition configuration for control plane nodes.

    Use the ocne cluster join command to generate the Ignition information that joins a control plane node to the cluster. Use the syntax:

    ocne cluster join 
    [{-c|--config} path] 
    [{-d|--destination} path]
    [{-N|--node} name]
    [{-P|--provider} provider]
    [{-r|--role-control-plane}]

    For more information on the syntax options, see Oracle Cloud Native Environment: CLI.

    The important options are:

    ocne cluster join --kubeconfig path --role-control-plane --config path > ignition_file

    Important:

    The --kubeconfig option is required, even if this is set as an environment variable.

    For example:

    ocne cluster join --kubeconfig ~/.kube/kubeconfig.mycluster --role-control-plane --config myconfig.yaml > ignition-control-plane.ign

    The output includes important information used later in the upgrade.

    Important:

    You don't need to run the command shown in the output. Instead, take note of the certificate-key and token in this output.

  3. Encode the Ignition file.

    The Ignition information must be base64 encoded to load it into OCI. For example:

    openssl enc -base64 -in ignition-control-plane.ign -out ignition-control-plane-base64.ign
  4. Generate the Ignition configuration for worker nodes.

    Use the ocne cluster join command to generate the Ignition information that joins a worker node to the cluster. The important options are:

    ocne cluster join --kubeconfig path --config path > ignition_file

    Important:

    The --kubeconfig option is required, even if this is set as an environment variable.

    For example:

    ocne cluster join --kubeconfig ~/.kube/kubeconfig.mycluster --config myconfig.yaml > ignition-worker.ign

    The output includes important information used later in the upgrade.

    Important:

    You don't need to run the command shown in the output. Instead, take note of the token in this output.

  5. Encode the Ignition file.

    For example:

    openssl enc -base64 -in ignition-worker.ign -out ignition-worker-base64.ign