More Info:
Setting rotateCertificates to true allows kubelet to automatically renew its client certificate before expiry. Without rotation, expired certs cause node outages and long-lived credentials raise the impact of compromise.Risk Level
MediumAddress
Compliance, SecurityCompliance Standards
- CIS OKE
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate this in OCI OKE via the Console, you need to enable Kubelet certificate auto-rotation on the cluster.Prerequisites
- You must be using VNIC-native Pod networking (required for kubelet cert rotation in OKE).
- You need permissions to update OKE clusters in the compartment.
1. Confirm the Cluster Networking Type
- Sign in to the OCI Console.
- Open the Navigation Menu → Developer Services → Kubernetes Clusters (OKE).
- Select the Compartment where your cluster resides.
- Click your Cluster name.
- On the cluster Details page, check:
- Cluster Type / Networking:
- If it shows something like “Native VCN / VCN-native pods (VNP)” or similar wording, you’re using VNIC-native Pod networking.
- If you are on older Flannel/Overlay networking, kubelet cert auto-rotation will not be available; you would need to create a new cluster with VCN-native Pod networking and migrate workloads.
- Cluster Type / Networking:
2. Enable Kubelet Client Certificate Auto-Rotation
- Still on the Cluster Details page for your OKE cluster:
- In the top-right corner, click Edit Cluster (or Update Cluster depending on UI version).
- Look for the Security or Kubernetes Configuration section; the exact wording can vary, but find:
- Kubelet client certificate auto-rotation
- Or Enable kubelet certificate rotation
- Check/enable the option:
- Example: Tick Enable kubelet client certificate auto-rotation.
- Click Save changes / Update.
3. (If Needed) Cycle Nodes to Pick Up the Setting
If the setting was just enabled on an existing cluster and node pools:- From the cluster page, go to Node Pools.
- For each node pool:
- Option A: Rolling restart / Rolling replace nodes if the UI provides that.
- Option B: Manually:
- Drain and terminate nodes one at a time, allowing the node pool to recreate them, so new nodes start with the updated cluster config.
- Verify nodes come back to Active status and workloads reschedule successfully.
4. Validate Kubelet Cert Rotation
From a workstation withkubectl access:- List kubelet certificates on a node (via SSH) or check
kubeletlogs to confirm:- Certificates now have a shorter lifetime and are renewed periodically.
- Optionally, use
kubectl get csr(if your OKE version exposes CSRs) to see certificate signing requests being created/approved over time.
Using CLI
Using CLI
Below is a CLI‑only way to enable kubelet client certificate auto‑rotation on an OKE cluster.
Open If you don’t see
If your existing cluster already uses options like Then edit and save it as
Replace
Should return:
This enables kubelet client certificate auto‑rotation for that OKE cluster using OCI CLI.
Note: Field names can change slightly between CLI versions. I’ll show you how to discover the exact flag via the CLI itself so you’re not guessing.
1. Make sure you have a recent OCI CLI
2. Discover the cluster options payload structure
Generate the full JSON skeleton forupdate-cluster:cluster-update.json and look for the options section. You should see something like:isKubeletCertificateRotationEnabled, upgrade the CLI and re‑check; if it uses a different name, use that exact field instead.3. Create a minimal options JSON file
Create a fileoke-kubelet-rotation-options.json with only the fields you want to change. For example:serviceLbSubnetIds, addOns, etc., include them as well so they don’t get cleared. You can grab the current options from:current-options.json to set:oke-kubelet-rotation-options.json.4. Apply the update to the cluster
<cluster_ocid> with your OKE cluster OCID.5. Verify the setting
This enables kubelet client certificate auto‑rotation for that OKE cluster using OCI CLI.
Using Python
Using Python
In OKE, kubelet client certificate auto-rotation is controlled per node pool via the
To remediate, you need to enable this on every node pool in your clusters using the OCI Python SDK.Below is a concise step‑by‑step with Python code.
is_kubelet_certificate_rotation_enabled flag.To remediate, you need to enable this on every node pool in your clusters using the OCI Python SDK.Below is a concise step‑by‑step with Python code.
1. Prerequisites
- Install the OCI Python SDK:
- Configure OCI credentials (one of):
~/.oci/configwith a profile (e.g.DEFAULT), or- Instance principal / resource principal (if running on OCI).
~/.oci/config example:2. Enable kubelet certificate rotation for all node pools in a compartment
This script:- Connects to OKE (Container Engine for Kubernetes).
- Lists all node pools in a given compartment (optionally filtered by cluster).
- Updates each node pool to set
is_kubelet_certificate_rotation_enabled=Trueif not already set.
3. Notes / Operational Considerations
- Rolling update:
update_node_pooltriggers a rolling update of the node pool. Plan for some disruption; ensure PodDisruptionBudgets and replicas are configured. - Per‑node‑pool: You must run this for each node pool in each cluster that should have rotation enabled.
- Idempotent: Re-running the script is safe; it skips pools where rotation is already enabled.
- Validation: After completion, describe the node pool and confirm
isKubeletCertificateRotationEnabledshows astruein:- OCI Console → OKE → Node Pools, or
get_node_poolvia SDK/CLI.
Using Terraform
Using Terraform

