Creating the OraclePCA-OKE.cluster_id Tag

The OraclePCA-OKE.cluster_id tag is required to create or update an OKE cluster or node pool. When you create a node pool, or update the node pool to add nodes, this tag is applied to every node to identify instances that need to be members of the dynamic group.

The following sections describe how to create the OraclePCA-OKE tag namespace and the cluster_id tag key. You must create both the tag namespace and the tag key.

Important:

Do not delete this tag key definition. The tag namespace name must be exactly "OraclePCA-OKE", and the tag key name must be exactly "cluster_id".

Creating the OraclePCA-OKE Tag Namespace

Using the Compute Web UI

  1. In the navigation menu, select Governance, and then select Tag Namespaces.

    Ensure that the compartment that is selected in the compartment drop-down menu above the tag namespaces list is the compartment where you want to create the OraclePCA-OKE.cluster_id tag.

  2. If OraclePCA-OKE is not shown in the Tag Namespaces list, select the Create Namespace Definitions button.

  3. In the Create Namespace Definition dialog, scroll down to the Tagging section and click in the Tag Namespace field.

    • If the OraclePCA-OKE tag namespace is not listed, continue with Step 4 of this procedure.

    • If the OraclePCA-OKE tag namespace is already available, select the Cancel button in the Create Namespace Definition dialog. You will get an error message if you try to create this tag namespace when it is already available.

  4. In the Create Namespace Definition dialog, enter the following information:

    • Namespace Definition Name: Enter "OraclePCA-OKE".

    • Description: For example, "Required to create or update an OKE cluster or node pool."

  5. Select Create Namespace Definition.

    The details page for the new OraclePCA-OKE tag namespace is displayed.

Using theOCI CLI

Run the tag namespace create command. The --compartment-id value is the compartment where you want to create the OraclePCA-OKE.cluster_id tag. If this tag has already been created in a different compartment, then it is available to use in any other compartment, and you will receive an error message from this create tag namespace command.

$ oci iam tag-namespace create --compartment-id ocid1.compartment.unique_ID \
--name OraclePCA-OKE --description "Required to create or update an OKE cluster or node pool."
{
  "data": {
    "compartment-id": "ocid1.compartment.unique_ID",
    "defined-tags": {
      "Oracle-Tags": {
        "CreatedBy": "okeuser",
        "CreatedOn": "2024-06-06T14:37:29.26Z"
      }
    },
    "description": "Required to create or update an OKE cluster or node pool.",
    "freeform-tags": {},
    "id": "ocid1.tag_namespace.unique_ID",
    "is-retired": false,
    "lifecycle-state": "ACTIVE",
    "locks": null,
    "name": "OraclePCA-OKE",
    "time-created": "2024-06-06T14:37:29.357678+00:00"
  },
  "etag": "a86bcf9b-f9a3-4891-b632-37d490161fe5"
}

Creating the cluster_id Tag Key

Using the Compute Web UI

  1. Navigate to the OraclePCA-OKE tag namespace details page, scroll down to the Resources box, and select Tag Key Definitions.

  2. If the cluster_id tag key is listed, select the name to display the details page. Ensure that Tag Value Type is String.

  3. If the cluster_id tag key is not listed, select the Create Tag Key Definition button.

  4. In the Create Tag Key Definition dialog, enter the following information:

    • Name: Enter "cluster_id".

    • Description: For example, "Required to create or update an OKE cluster or node pool."

    • Tag Value Type: Select "Static Value".

  5. Select Create Tag Key Definition.

Using theOCI CLI

  1. Check whether the cluster_id tag already exists in the OraclePCA-OKE tag namespace.

    $ oci iam tag list --tag-namespace-id ocid1.tag_namespace.unique_ID
  2. If the cluster_id tag key is listed, view the details of the tag to confirm that validator-type is DEFAULT.

    $ oci iam tag get --tag-namespace-id ocid1.tag_namespace.unique_ID --tag-name cluster_id
  3. If the cluster_id tag key is not listed, run the tag create command.

    You do not need to specify the --validator option because you want the default value.

    $ oci iam tag create --tag-namespace-id ocid1.tag_namespace.unique_ID \
    --name "cluster_id" --description "Required to create or update an OKE cluster or node pool." \
    --validator '{"validatorType": "DEFAULT"}'
    {
      "data": {
        "compartment-id": "unique_ID",
        "defined-tags": {
          "Oracle-Tags": {
            "CreatedBy": "okeuser",
            "CreatedOn": "2024-06-06T21:36:51.38Z"
          }
        },
        "description": "Required to create or update an OKE cluster or node pool.",
        "freeform-tags": {},
        "id": "ocid1.tag.unique_ID",
        "is-cost-tracking": false,
        "is-retired": false,
        "lifecycle-state": "ACTIVE",
        "name": "cluster_id",
        "tag-namespace-id": "ocid1.tag_namespace.unique_ID",
        "tag-namespace-name": "OraclePCA-OKE",
        "time-created": "2024-06-06T21:36:51.456538+00:00",
        "validator": {
          "validator-type": "DEFAULT"
        }
      },
      "etag": "5bf59d9a-5998-4857-a590-fca2a3386cc2"
    }