Troubleshooting

Service externalIPs in Kubernetes 1.36: Deprecated, Not Removed

Kubernetes 1.36 only warns on Service externalIPs; kube-proxy support ends no earlier than v1.40 and v1.43. What CVE-2020-8554 means, where sources disagree, and how to audit and migrate.

Approximately 8 min read

A Service field that has been called unsafe since 2020 is finally on a deprecation path, and the headlines around Kubernetes 1.36 have blurred what that actually means. The accurate statement is narrow: in v1.36, .spec.externalIPs is deprecated and produces warnings. It is not removed, and the project’s own schedule keeps kube-proxy honoring it until at least v1.40.

That distinction decides what an operator should do this quarter. If you believe the field is already gone, you skip the audit. If you believe it is harmless because it still works, you leave a known man-in-the-middle primitive in place. This article separates what the primary sources state, where they disagree, and what you can verify yourself.

What the sources say, and how strongly

Upstream statement (Kubernetes project). The v1.36 deprecation post describes the field as an early attempt to give non-cloud clusters something like cloud load-balancer behavior. It says the API assumes every user in the cluster is fully trusted, which enables the exploit described in CVE-2020-8554, and that the project has recommended disabling the field since Kubernetes 1.21. The Chinese translation of the same post carries the schedule: warnings from v1.36, kube-proxy support switched off but re-enableable at the earliest in v1.40, and fully removed at the earliest in v1.43.

Design record. KEP-5707 describes four phases with tentative versions. Phase 1 (v1.36) deprecates the field and emits API-server warnings. Phase 2 (tentatively v1.40) flips the kube-proxy gate default to false. Phase 3 (tentatively v1.43) locks it to false and removes kube-proxy code. A fourth phase, roughly three releases later, removes the gate and the DenyServiceExternalIPs admission controller. The word “tentative” matters: these are plans, not shipped behavior.

Secondary reporting. One third-party upgrade guide, ecorpit, also reads the change as deprecated rather than removed, and places a later code cleanup at v1.46. It agrees with the upstream timeline but is not independent evidence of behavior; it paraphrases the same announcement.

No source I opened reports that externalIPs stopped working in v1.36. The claim that it was “removed in 1.36” is not supported.

Where the evidence conflicts

Two discrepancies are worth knowing about before you write an internal advisory.

First, the KEP’s Phase 1 text says a kube-proxy feature gate named AllowServiceExternalIPs is added in v1.36, but the KEP is internally inconsistent about that gate’s default: one section says true, another describes it as false. The post, by contrast, ties kube-proxy behavior changes to v1.40 and later.

Second, the feature-gate reference pages disagree with each other. The v1.37 reference lists AllowServiceExternalIPs as Deprecated since 1.36 with default true, described as kube-proxy continuing to respect the deprecated field. The v1.36 reference that I fetched does not list the gate at all. That could be a documentation gap, a late-added gate, or an artifact of how I retrieved the page. I cannot tell which from the documents alone.

The practical reading is conservative and consistent across all of them: on a v1.36 or v1.37 cluster, kube-proxy still programs rules for externalIPs by default. Treat the field as live.

You do not need to trust my reading. In a disposable environment, start the exact kube-proxy binary you deploy with --feature-gates=AllowServiceExternalIPs=true and see whether it starts or rejects the name as an unrecognized gate. That check, which I did not execute, resolves the question for your version.

Why the field is dangerous

The mechanism is simple. A Service with externalIPs asks the cluster to treat traffic for an arbitrary IP address as belonging to that Service, and kube-proxy programs the node data plane (iptables, nftables or IPVS) to forward that traffic to the Service’s endpoints. The API does not validate who owns the address, and the KEP cites this missing validation, along with the manual routing the feature needs, as part of its motivation.

CVE-2020-8554 is the consequence. According to the project’s advisory, all Kubernetes versions are affected and there is no patch, because a fix would require user-facing breaking changes. The advisory frames it as a design flaw and rates it medium severity with the vector CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L. The attacker needs enough access to create or edit Services and Pods, which is the ordinary position of a tenant in a shared cluster. A separate path abuses the ability to patch a LoadBalancer Service’s status, which the advisory says should not normally be granted. The reported effect is interception of traffic from other pods or nodes destined for the chosen IP.

The original advisory lists mitigations: restrict who can use the features, deploy an ExternalIP admission webhook, or apply an OPA Gatekeeper constraint. For LoadBalancer status it offers no mitigation beyond withholding the patch permission on services/status. Detection is manual: audit externalIP usage and treat user-authenticated status patches as suspicious.

This is also why single-tenant clusters are not immune in principle. Anyone or any controller with Service write access can create the condition, so the exposure follows your RBAC, not your headcount.

The migration options have different trust models

The upstream post offers three replacements. They are not equivalent from a security standpoint.

1. A hand-managed LoadBalancer Service. You create a type: LoadBalancer Service with a loadBalancerClass that no controller owns, then write the address into .status. The post itself notes this only shifts the problem to whoever can write status, which is the second CVE precondition. Use it only if status-write is tightly restricted.

2. A bare-metal load-balancer controller such as MetalLB. An administrator defines an address pool; users request type: LoadBalancer. According to MetalLB’s usage documentation, a specific address is requested with spec.loadBalancerIP or the metallb.io/loadBalancerIPs annotation, which also accepts a list for dual-stack Services. If MetalLB does not own the address, or another Service already uses it, allocation fails and a warning event appears on the Service. The same page says spec.loadBalancerIP is planned to be deprecated on the Kubernetes API side, so the annotation is the safer long-term spelling. Sharing one IP between Services requires an explicit allow-shared-ip annotation and compatible ports and traffic policy.

3. Gateway API. An administrator creates a Gateway and sets .spec.addresses. Because Gateways are administrator-owned objects, RBAC can restrict who controls them. Red Hat’s OpenShift 4.19 rendering of the Gateway CRD marks the field “Support: Extended”, says its behavior can depend on the implementation, and says an implementation must indicate in status when a requested address is invalid or unavailable. That is a failure signal you can alert on, but it means a typo can leave the Gateway without the address you wanted.

None of these removes the need for IP ownership to be decided by an administrator rather than a tenant. That is the actual security property being restored.

Failure modes to plan for

A verification method you can run

I did not execute any of these steps. No Kubernetes cluster was available when this was written, so everything below is a procedure for you, not a result.

  1. Inventory. List every Service that sets the field: kubectl get svc --all-namespaces -o custom-columns='NAMESPACE:.metadata.namespace,NAME:.metadata.name,EXTERNAL_IPS:.spec.externalIPs' Rows with a value in the last column are your migration list.
  2. Observe the warning. In a disposable v1.36 or newer cluster, apply a test Service with a documentation-range address such as 192.0.2.4 and read the client output. The KEP says the API server warns on create and update.
  3. Check gate support. In a test environment, start your deployed kube-proxy version with --feature-gates=AllowServiceExternalIPs=true. Startup means the gate is known; an unrecognized-gate error means it is not. This settles the documentation conflict above for your version.
  4. Review status-write access. For each non-administrator identity, test kubectl auth can-i patch services --subresource=status --as=<identity>. Any unexpected “yes” is a finding under the advisory’s second path.
  5. Rehearse the migration. Move one Service to a MetalLB or Gateway address in a test namespace, then confirm the externally observed traffic path, not just that the object applied. Admission acceptance proves nothing about routing.
  6. Block new uses. Once the inventory is clean, enable DenyServiceExternalIPs, or enforce the same rule with a validating admission policy. Validating admission policies are described in the Kubernetes documentation as a declarative, in-process alternative to webhooks written in CEL and stable since v1.30. I did not verify a specific policy expression, so test yours before relying on it.

What this article does not establish

It does not measure how many production clusters still use the field, and it does not demonstrate an exploit. It does not confirm what happens at the v1.40 boundary, because that release has not shipped and its schedule is described as tentative. It also does not verify behavior on any specific distribution. The recommendations above follow from the project’s own stated risk model and timeline; they are reasoned, not benchmarked.

For a related example of putting interim controls in front of an unfixed infrastructure risk, see the OpenShift compensating-controls playbook.

Evidence status: source analysis of public Kubernetes documents, the KEP and the CVE-2020-8554 advisory, with retrieval caveats noted in the text. Runtime claims are attributed to the upstream project; RAMGPT executed no cluster tests for this article.

Sources and further reading