Installing a Cluster Add-on
Find out how to install a cluster add-on using Kubernetes Engine (OKE).
You can install a cluster add-on when creating a new cluster, or for an existing cluster.
For specific instructions to install:
- the Cluster Autoscaler add-on, see Deploying the Cluster Autoscaler Add-on
- the Istio add-on, see Deploying the Istio Add-on
- the OCI native ingress controller add-on, see Deploying the OCI Native Ingress Controller Add-on
- the Kubernetes Metrics Server add-on, see Deploying the Kubernetes Metrics Server as a Cluster Add-on
For more information about cluster add-ons, see Configuring Cluster Add-ons.
Deploy and Configure a Cluster Add-on When Creating a Cluster
- Follow the instructions in Using the Console to create a Cluster with Explicitly Defined Settings in the 'Custom Create' workflow to create a cluster.
- Display the Configure cluster add-ons section of the Create Cluster page to display the enabled and available cluster add-ons.
By default, when creating a new cluster:
- Essential cluster add-ons (such as CoreDNS and kube-proxy) are shown as enabled, and automatically updated.
- Optional cluster add-ons (such as Kubernetes Dashboard) are shown as disabled.
Note that you choose the CNI plugin for pod networking on the Network setup page, so the CNI plugin isn't shown in the Configure cluster add-ons section when creating a cluster.
- Click the name of the add-on that you want to deploy and configure.
-
Select the Enable <add-on name> option to deploy and enable the cluster add-on when creating the cluster.
Note that you can't disable essential add-ons when creating a cluster.
- Configure the cluster add-on by specifying the following details:
- Automatic updates: Select this option when you want Oracle to automatically update the add-on when a new version becomes available.
- Choose a version: Select this option when you want to control the version of the add-on that Oracle deploys on the cluster. A warning indicates that you have taken responsibility for updating the add-on. If you choose this option, select the version of the add-on to deploy on the cluster from the Version list. See Cluster Add-on Supported Versions.
- Option: and Value: (Optional) Specify one or more key/value pairs to pass as arguments to the cluster add-on. For example, for the Kubernetes Dashboard, you might select the
numOfReplicas
option, and specify a value of3
. See Cluster Add-on Configuration Arguments.
Deploy and Configure a Cluster Add-on for an Existing Enhanced Cluster
- Open the navigation menu and click Developer Services. Under Containers & Artifacts, click Kubernetes Clusters (OKE).
- Select the compartment that contains the cluster.
- On the Clusters page, click the name of the cluster that you want to modify.
- Under Resources, click Add-ons.
- Click Manage add-ons, and then click the cluster add-on that you want to deploy and configure.
-
Select the Enable <add-on name> option to deploy and enable a cluster add-on that hasn't been enabled on this cluster before, or to enable a cluster that has been deployed previously but is currently disabled.
- Configure the cluster add-on by specifying the following details:
- Automatic updates: Choose this option when you want Oracle to automatically update the add-on when a new version becomes available.
- Choose a version: Choose this option when you want to control the version of the add-on that Oracle deploys on the cluster. A warning indicates that you have taken responsibility for updating the add-on. If you choose this option, select the version of the add-on to deploy on the cluster from the Version list. See Cluster Add-on Supported Versions.
- Option: and Value: (Optional) Specify one or more key/value pairs to pass as arguments to the cluster add-on. For example, for the Kubernetes Dashboard, you might select the
numOfReplicas
option, and specify a value of3
. See Cluster Add-on Configuration Arguments.
- Click Save changes.
Use the oci ce cluster install-addon command and required parameters to deploy a cluster add-on:
oci ce cluster install-addon --cluster-id <cluster-ocid> --addon-name <addon-name> [OPTIONS]
For example:
oci ce cluster install-addon --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaaf______jrd --addon-name KubernetesDashboard --addon-version v2.7.0-multiarch-1.25-2
You use the--configurations
parameter to specify one or more key/value pairs to pass as arguments to the cluster add-on, in JSON format. You have to escape double quotation marks within the JSON using a single backslash. For example:oci ce cluster install-addon --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaaf______jrd --addon-name KubernetesDashboard --addon-version v2.7.0-multiarch-1.25-2 --configurations "[{\"key\": \"numOfReplicas\", \"value\": \"3\"}]"
Note that if the value of a key is itself required in JSON format, you have to escape double quotation marks inside the nested JSON using three backslashes. For example:
oci ce cluster install-addon --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaaf______jrd --addon-name KubernetesDashboard --addon-version v2.7.0-multiarch-1.25-2 --configurations "[{\"key\": \"tolerations\", \"value\": \"[{\\\"key\\\":\\\"special\\\", \\\"value\\\":\\\"true\\\", \\\"effect\\\":\\\"noSchedule\\\",\\\"operator\\\":\\\"exists\\\"}]\"}]"
To make the
--configurations
parameter less unwieldy, surround key/value pairs with single quotation marks (rather than double quotation marks). When you surround the key/value pair with single quotation marks, you do not have to escape double quotation marks in the JSON with a single backslash. And if the value of a key itself contains JSON, you only have to escape double quotation marks in the nested JSON with a single backslash (rather than three backslashes). For example:oci ce cluster install-addon --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaaf______jrd --addon-name KubernetesDashboard --addon-version v2.7.0-multiarch-1.25-2 --configurations '[{"key": "numOfReplicas", "value": "3"}]'
oci ce cluster install-addon --cluster-id ocid1.cluster.oc1.iad.aaaaaaaaaf______jrd --addon-name KubernetesDashboard --addon-version v2.7.0-multiarch-1.25-2 --configurations '[{"key": "tolerations", "value": "[{\"key\":\"special\", \"value\":\"true\", \"effect\":\"noSchedule\",\"operator\":\"exists\"}]"}]'
Run the InstallAddon operation to install a cluster add-on.