More Info:
Kubelet server certificates should be rotated automatically (via RotateKubeletServerCertificate) so kubelets serving cert is short-lived and approved by the API server, reducing the window of misuse for stolen serving keys.Risk Level
MediumAddress
Compliance, SecurityCompliance Standards
- CIS OKE
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
Below are step‑by‑step remediation steps using the OCI Console to ensure kubelet server certificates are auto‑rotated for OKE node pools.
Prerequisites
- You must have permissions to manage OKE clusters and node pools in the target compartment.
- The cluster/node pool must be on a Kubernetes version that supports kubelet certificate rotation (all recent OKE versions do).
1. Identify the OKE cluster and node pools
- In the OCI Console, open the Navigation menu (≡).
- Go to Developer Services → Kubernetes Clusters (OKE).
- Choose the appropriate Compartment from the left-side compartment selector.
- Click the Cluster that corresponds to the misconfiguration finding.
- In the cluster details page, go to the Node Pools tab.
- Identify the node pool(s) associated with the finding (usually all worker node pools should have rotation enabled).
2. Edit the node pool to enable kubelet certificate auto‑rotation
You must do this for each node pool that does not have auto‑rotation enabled.- In the Node Pools tab, click the name of the node pool you want to fix.
- On the node pool details page, click Edit (or Update Node Pool).
- In the edit form, look for a setting similar to:
- Kubelet certificate rotation
- or Auto-rotate kubelet certificates
- Enable this setting by checking the box or setting the toggle to On / Enabled.
- Review other configuration fields to ensure nothing else is unintentionally changed.
- Click Save changes / Update.
3. Repeat for all node pools in the cluster
- Go back to the Node Pools list for the cluster.
- Repeat the “Edit node pool” steps for every remaining node pool that does not have kubelet certificate rotation enabled.
4. Verify that kubelet certificate rotation is enabled
- After updates complete, return to each Node Pool details page.
- Confirm that the Kubelet certificate rotation (or similarly named) field is shown as Enabled.
- Optionally, validate from a node:
- SSH or use
kubectl debugto access a node. - Check kubelet configuration (e.g., kubelet service or config file) to verify certificate rotation flags are present (implementation detail; optional for compliance).
- SSH or use
5. Re-scan / re-run compliance check
After the configuration is updated and node pools finish updating:- Trigger a new scan in your security/compliance tool (Cloud Guard, third‑party CSPM, etc.).
- Confirm that the finding “OCI OKE Kubelet Server Certificates Should Be Auto-Rotated” is now marked as resolved for that cluster/node pool.
Using CLI
Using CLI
For OKE today, kubelet server certificate rotation is controlled at the cluster level by the “Auto-Rotate Kubernetes Certificates” setting. As of the latest OKE / OCI CLI versions, that specific toggle is only exposed in the Console and REST API, not as a dedicated boolean flag in
1. Use the OKE API via
This keeps everything in OCI CLI, but calls the underlying Container Engine REST API directly.Inspect Replace 1.3. Call the OKE UpdateCluster API via
oci ce cluster update.So you cannot (yet) flip just that setting with a simple oci ce ... --is-auto-rotate-... style flag. You have two realistic options:1. Use the OKE API via oci raw-request (CLI wrapper around REST)
This keeps everything in OCI CLI, but calls the underlying Container Engine REST API directly.1.1. Get cluster details to see current configuration
cluster-current.json so you can see the current clusterOptions (or similarly named) block and confirm whether there is a field related to Kubernetes certificate rotation (name can vary by release – examples like isKubernetesCertificatesAutoRotationEnabled or similar).1.2. Build the update payload
Create a minimal JSON file, e.g.cluster-update.json, reusing the current values and only toggling the certificate rotation setting. Do not drop required fields such as name, kubernetesVersion, etc., as the update is usually PATCH-like but still field-sensitive.Example structure (you must match the exact field names from your cluster-current.json):isKubernetesCertificatesAutoRotationEnabled with the exact property name visible in your current cluster JSON.1.3. Call the OKE UpdateCluster API via oci raw-request
-
Get the region and tenancy details (if not set already in your CLI profile):
-
Call the update API endpoint:
-
Wait for the work request to finish:
2. If you can relax the “OCI CLI only” constraint
If strict “CLI only” is not mandatory, the supported and simpler way is:- Go to: Developer Services → Kubernetes Clusters (OKE).
- Select the cluster.
- Click Edit cluster.
- Enable Auto-Rotate Kubernetes Certificates.
- Save changes and wait for the update to complete.
Key points for your remediation policy
- Scope: This is a cluster-level setting affecting kubelet / Kubernetes certificates for nodes in that cluster.
- Enforcement: For compliance-as-code, wrap the
oci raw-requestapproach in a script or use Terraform/Resource Manager:- Ensure all new clusters have certificate auto-rotation enabled.
- Periodically scan and patch any cluster where the field is
false.
cluster-current.json (with sensitive OCIDs redacted), I can show you the exact JSON and oci raw-request command specific to your OKE version.Using Python
Using Python
For OKE, kubelet certificate rotation is controlled at the cluster configuration level. The remediation is:
Look for classes/fields similar to:You’re looking for a boolean field that clearly enables kubelet certificate rotation, commonly named close to
If your SDK surfaces the field in a slightly different location/name, adapt:
If you paste the
- Ensure the cluster has kubelet certificate rotation enabled.
- If the current OKE version/SDK supports toggling it on an existing cluster, update the cluster.
- If not supported for your cluster version, recreate the cluster with the setting enabled.
1. Prerequisites
ociPython SDK installed:- OCI config file set up (usually
~/.oci/config) with:- tenancy
- user
- fingerprint
- key_file
- region
- The OCID of the OKE cluster you want to remediate.
2. Inspect SDK Models to Find the Kubelet Config Flag
Because OCI’s API models evolve, you should first introspect which model field is available in your SDK version for kubelet certificate rotation.Run this small helper once in a Python shell:KubeletConfigUpdateClusterKubeletConfigDetails- A boolean named like
is_kubelet_certificate_rotation_enabledin any of the*Cluster*Options*models.
is_kubelet_certificate_rotation_enabled.3. Example: Updating an Existing Cluster (If Supported)
Below is template code showing the pattern. You must plug in the exact model and field name you discovered in step 2.- Different model name for options (e.g.,
ClusterCreateOptions,UpdateClusterOptionsDetails). - Direct field on
UpdateClusterDetails.
4. If Your OKE/SDK Version Does Not Expose the Flag
If you don’t find any kubelet‑related configuration model/field:-
It may be:
- Already enabled by default for your cluster’s OKE version, or
- Only configurable at cluster creation time in your region/version.
-
In that case, the remediation path is:
- Create a new OKE cluster via the Console or Python SDK, explicitly enabling kubelet certificate rotation during creation (look for the kubelet certificate rotation option in the Console or
CreateClusterDetailsoptions in the SDK). - Migrate workloads (namespaces, deployments, services) to the new cluster.
- Decommission the old cluster.
- Create a new OKE cluster via the Console or Python SDK, explicitly enabling kubelet certificate rotation during creation (look for the kubelet certificate rotation option in the Console or
If you paste the
dir(models) and swagger_types output for the kubelet-related models from your environment, I can give you an exact, concrete Python snippet for your specific SDK version.Using Terraform
Using Terraform

