More Info:
Kubelet HTTP endpoints transmit credentials and pod data in cleartext and bypass authentication. Force HTTPS-only listeners so all kubelet traffic is encrypted and authenticated.Risk Level
CriticalAddress
Compliance, SecurityCompliance Standards
- CIS OKE
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To ensure OKE kubelets only serve HTTPS (and disable the insecure/read‑only HTTP port), you must configure the kubelet options on the node pool. This is done from the OCI Console at the node pool level.A. Check current node pool kubelet settings
B. Update the node pool so kubelet uses HTTPS onlyIn most OKE versions, kubelet insecure/read‑only port settings are immutable for existing nodes. The secure practice is to create a new node pool with hardened kubelet settings, then drain and delete the old one.
C. (Optional) Network-level enforcementTo further ensure no HTTP access to kubelet:
After the new node pool is in place with kubelet read‑only port disabled and network rules tightened, all kubelet traffic will be restricted to HTTPS (TLS on 10250) only.
- Sign in to the OCI Console.
- Go to Developer Services → Kubernetes Clusters (OKE).
- Select your compartment and then your cluster.
- In the cluster details page, open the Node Pools tab.
- Click the node pool you want to harden.
- Look for Kubelet configuration or Kubelet security settings (the exact label depends on OKE version).
- If you see options like “Enable Kubelet read-only port” or “Enable anonymous access”, and they are enabled, the kubelet can serve HTTP traffic on the insecure/read‑only port (typically 10255).
B. Update the node pool so kubelet uses HTTPS onlyIn most OKE versions, kubelet insecure/read‑only port settings are immutable for existing nodes. The secure practice is to create a new node pool with hardened kubelet settings, then drain and delete the old one.
1. Create a new hardened node pool
- From the same cluster details page, go to Node Pools → Create node pool.
- Configure:
- Compartment, Name, Kubernetes version, Subnet(s), Shape, etc., to match your existing worker configuration (or your desired new config).
- Scroll to Kubelet configuration / Kubelet security settings:
- Uncheck / Disable:
- Enable Kubelet read-only port (or similar wording).
- This disables the HTTP read-only port (typically 10255).
- Any anonymous access setting (e.g.,
--anonymous-auth=falseis desired).
- Enable Kubelet read-only port (or similar wording).
- Ensure:
- Only the secure kubelet port (10250) is enabled.
- TLS remains enabled (default in OKE).
- Uncheck / Disable:
- Complete the rest of the wizard and click Create.
- Wait until the new node pool status is Active and nodes are Ready in the Kubernetes cluster (
kubectl get nodes).
2. Move workloads to the new node pool
-
Cordon and drain old nodes (from your workstation with kubeconfig):
-
Make sure your deployments / node selectors / taints allow scheduling onto the new node pool.
- If you use nodePoolId / oci.oraclecloud.com/metadata or other labels, update them or add labels to the new nodes and adjust selectors.
-
Confirm pods are running on the new nodes:
3. Delete the old node pool
- In the OCI Console, return to the Node Pools list for the cluster.
- Confirm that workloads are running on the new node pool only.
- Select the old node pool → Delete.
- Wait for the deletion to complete.
C. (Optional) Network-level enforcementTo further ensure no HTTP access to kubelet:
- Identify the security lists/NSGs attached to the worker subnets.
- In Networking → Virtual Cloud Networks → [Your VCN] → Subnets / NSGs:
- Confirm there are no ingress rules allowing traffic to:
- Port 10255 (kubelet read‑only, HTTP).
- Allow only:
- Port 10250 from control plane CIDRs (as required by OKE), not from the public internet.
- Confirm there are no ingress rules allowing traffic to:
After the new node pool is in place with kubelet read‑only port disabled and network rules tightened, all kubelet traffic will be restricted to HTTPS (TLS on 10250) only.
Using CLI
Using CLI
In OKE, kubelets already serve HTTPS on port 10250. The usual “HTTP only” risk comes from the legacy read-only HTTP port (10255). The practical remediation is to ensure kubelet’s
Base64‑encode it for use as On macOS:
Copy the
This ensures all new or replaced nodes in this pool run the hardening script on boot, disabling the HTTP port.
Then, one by one (to avoid downtime):Repeat for all nodes, or use your usual rolling‑update procedure.
Optionally check At that point, kubelet will only be serving over HTTPS (port 10250), and the insecure HTTP port is disabled.
readOnlyPort is disabled (set to 0) across all worker nodes. With managed nodes you do this via the node pool (so new/replaced nodes come up correctly), using the OCI CLI.Below is a concise, CLI‑only way to do that.1. Prepare a cloud‑init script to harden kubelet
Create a filekubelet-hardening.yaml:user_data:2. Identify your node pool
id of the node pool you want to harden:3. Merge user_data into node pool metadata via OCI CLI
- Fetch current node pool JSON:
- Extract existing node metadata (if any):
- Create a new metadata JSON that includes/overrides
user_data:
- Save it:
- Update the node pool:
4. Recycle nodes so the change takes effect
For existing nodes, the newuser_data only runs on (re)provisioning. Use oci ce node-pool or oci compute instance to rotate nodes:List nodes in the node pool:5. Verify kubelet only serves HTTPS
SSH to a node and verify:/var/lib/kubelet/config.yaml:Using Python
Using Python
To ensure kubelet only serves HTTPS in OCI OKE, the practical remediation you can do yourself is to block/disable HTTP (read-only kubelet port 10255) at the network level using OCI Security Lists or NSGs via the OCI Python SDK.Below is a step‑by‑step outline and a Python example.
Ensure
If you share whether your worker nodes are using Security Lists or NSGs (and how 10255 is currently allowed), I can tailor the Python snippet exactly to your setup.
1. Understand what needs to be blocked
Kubelet typically uses:- Port 10250 (HTTPS) – secure kubelet API (keep this, but restrict who can access it).
- Port 10255 (HTTP, read-only) – insecure kubelet API (must be blocked).
2. Identify the subnet / NSG / security list used by worker nodes
- Go to your OKE cluster in OCI Console.
- Check each Node Pool → Subnets used for worker nodes.
- For each subnet, note:
- Its OCID.
- Whether it uses:
- NSGs (preferred), or
- Security Lists.
3. Python SDK setup
Install SDK if needed:~/.oci/config is set up (with tenancy, user, fingerprint, private_key, region, and profile).4. Example: Block kubelet HTTP (10255) on a Security List via Python
This example:- Reads an existing security list.
- Removes any ingress on TCP/10255 (and optionally any unrestricted 10250).
- Updates the security list.
5. Example: Block kubelet HTTP (10255) on an NSG via Python
If your worker nodes use NSGs:6. Verify
- From a pod or external host, try:
curl http://<worker-node-ip>:10255/healthz→ should fail.curl https://<worker-node-ip>:10250/healthz(with proper auth/cert) → should work but only from allowed sources.
- Optionally run your security scanner again to confirm remediation.
If you share whether your worker nodes are using Security Lists or NSGs (and how 10255 is currently allowed), I can tailor the Python snippet exactly to your setup.
Using Terraform
Using Terraform

