Cluster Add-ons
With this module to manage both essential and optional add-ons on enhanced OKE clusters.
This module provides the option to remove Essential addons and to manage, both essential & optional addons.
Cluster add-on removal (using the cluster_addons_to_remove
variable) requires the creation of the operator host.
To list the available cluster add-ons for a specific Kubernetes version you can run the following oci-cli command:
oci ce addon-option list --kubernetes-version <k8s-version>
Note: For the cluster autoscaler you should choose only one of the options:
- the stand-alone cluster-autoscaler deployment, using the extension module
- the cluster-autoscaler add-on
When customizing the configuration of an existing addon, use the flag override_existing=true
. Default value is false if not specified.
Example usage
cluster_addons = {
"CertManager" = {
remove_addon_resources_on_delete = true
override_existing = true # Default is false if not specified
# The list of supported configurations for the cluster addons is here: https://docs.oracle.com/en-us/iaas/Content/ContEng/Tasks/contengconfiguringclusteraddons-configurationarguments.htm#contengconfiguringclusteraddons-configurationarguments_CertificateManager
configurations = [
{
key = "numOfReplicas"
value = "1"
}
]
}
# The NvidiaGpuPlugin is disabled by default. To enable it, add the following block to the cluster_addons variable
"NvidiaGpuPlugin" = {
remove_addon_resources_on_delete = true
},
# Prevent Flannel pods from being scheduled using a non-existing label as nodeSelector
"Flannel" = {
remove_addon_resources_on_delete = true
override_existing = true # Override the existing configuration with this one, if Flannel addon in already enabled
configurations = [
{
key = "nodeSelectors"
value = "{\"addon\":\"no-schedule\"}"
}
],
},
# Prevent Kube-Proxy pods from being scheduled using a non-existing label as nodeSelector
"KubeProxy" = {
remove_addon_resources_on_delete = true
override_existing = true # Override the existing configuration with this one, if KubeProxy addon in already enabled
configurations = [
{
key = "nodeSelectors"
value = "{\"addon\":\"no-schedule\"}"
}
],
}
}
cluster_addons_to_remove = {
Flannel = {
remove_k8s_resources = true
}
}