Page MenuHomePhabricator

Re-number the dse-k8s-eqiad pod network to 10.68.0.0/17
Closed, ResolvedPublic

Description

Move the dse-k8s-eqiad Pod network from 10.67.24.0/21 to 10.68.0.0/17, as required by the parent task T429773.

The original plan in this description was a full quiesce of the cluster inside a maintenance window. It has been replaced by a rolling migration that needs no downtime. The reasoning is written up in T430658#12337206.

The short version: clusterCIDR is only read by kube-proxy, and only when detectLocalMode is ClusterCIDR.
Switching dse-k8s-eqiad to detectLocalMode: InterfaceNamePrefix (prefix cali) detaches kube-proxy from the Pod IP range entirely, which lets both ranges be live at once while we roll the cluster onto the new pool.

This description is the working checklist. The migration is reversible up to phase 6.

Patches

Phase 0 - prerequisites

Nothing here touches running Pods. All of it must be live before a single Pod gets an address from the new range.

  • Netbox: 10.68.0.0/17 allocated (prefix 1532). The old /21 stays allocated until phase 6.
  • Confirm homer has actually pushed the prefix lists to the eqiad routers and ToR switches.
  • Merge 1343090, then confirm DSE_KUBEPODS_NETWORKS holds both ranges on a consumer host (nft list set inet base DSE_KUBEPODS_NETWORKS_ipv4, or the ferm def in /etc/ferm/conf.d/00_defs). Consumers: PKI, Ceph, dumps distribution, Puppet servers, Matomo DB, Airflow.
  • Apply the merged GlobalNetworkPolicy to the cluster - merging 1343097 did not deploy it: helmfile -e dse-k8s-eqiad -l name=calico apply. Confirm with kubectl get globalnetworkpolicy allow-pod-to-pod -o yaml that 10.68.0.0/17 is listed.
  • Merge the operations/dns change adding the 128 /24 reverse delegations for 10.68.0.0/17 to dse-k8s-ctrl1001/1002. CoreDNS on the control planes answers Pod PTR queries through the kubepods plugin, and 10.in-addr.arpa delegates one /24 at a time, so migrated Pods lose reverse DNS without it. CoreDNS itself needs no change - the Corefile passes it no Pod CIDR.

Known gap, deliberately deferred: dumpsgen_authorized_keys and analytics_sre_authorized_keys pin from="10.67.24.0/21,...". The firewall opens for the new range automatically, but sshd will still refuse it, so rsync from new-range Pods will fail until those two files are updated.

Phase 1 - switch kube-proxy detect-local mode

  • Merge 1343023. Verify no diff on any node: /etc/kubernetes/kube-proxy-config.yaml should be unchanged everywhere.
  • Disable puppet on all dse-k8s-eqiad workers and control planes, so that merging 1343024 does not restart kube-proxy fleet-wide on the next agent run.
  • Merge 1343024.
  • Enable puppet and run it on one worker only. Check:
  • detectLocalMode: InterfaceNamePrefix and detectLocal.interfaceNamePrefix: cali present, clusterCIDR absent
  • systemctl status kube-proxy healthy
  • iptables-save -t nat | grep -c 'cali+' is non-zero
  • from a Pod on that node, connect to a ClusterIP and confirm the backend still logs a Pod IP rather than a node IP
  • Roll puppet across the remaining workers and the control planes.

Phase 2 - add the new pool

  • Add 10.68.0.0/17 as a second entry in the IPPools map in dse-k8s-eqiad/calico-values.yaml. The chart generates the IPPool and the BGP prefixAdvertisements from that map, so this is values-only.
  • helmfile -e dse-k8s-eqiad -l name=calico apply
  • Confirm the new IPPool exists and the routers are accepting /26s from it.

Phase 3 - disable the old pool

  • Set disabled: true on the existing v4 pool in calico-values.yaml, not with kubectl patch, or the next helmfile run will revert it.
  • helmfile -e dse-k8s-eqiad -l name=calico apply
  • Existing Pods and blocks keep working. Confirm no new allocations come from 10.67.24.0/21.

Phase 4 - roll the nodes

Pre-flight: the cookbook refuses to start if any node is cordoned. Check kubectl get nodes and uncordon everything first, including anything left cordoned from T429773.

  • cookbook sre.k8s.reboot-nodes --k8s-cluster dse-eqiad --alias dse-k8s-worker-eqiad --batchsize 1 --task-id T430658 reboot
  • Do not pass --minimal-cordon. The default behaviour cordons the nodes it has not reached yet after the first batch, which is what stops evicted Pods bouncing back onto the old range.
  • The dedicated wdqs workers are a separate taint group and are processed separately.
  • Watch progress with calicoctl ipam show --show-blocks. Calico releases old blocks as they empty.

Phase 5 - verify

  • No blocks remain in 10.67.24.0/21.
  • New Pods get addresses from 10.68.0.0/17.
  • BGP sessions up, /26s from the new range accepted on the routers and switches.
  • Pods can reach their backends: HDFS, Hive, Kerberos, databases, Ceph, PKI.
  • Flink applications are RUNNING / STABLE and consuming from where they left off.
  • Bring the cluster past the old 32 node limit: revert 1305467 to return dse-k8s-worker101[567], and confirm the previously blocked workers claim blocks and schedule Pods.

Phase 6 - cleanup

From here the migration is no longer reversible.

  • Remove the old pool from calico-values.yaml and apply.
  • Remove cluster_cidr for dse-k8s-eqiad from hieradata/common/kubernetes.yaml.
  • Remove 10.67.24.0/21 from the allow-pod-to-pod GlobalNetworkPolicy.
  • Remove the old dse-kubepods entry from modules/network/data/data.yaml.
  • Remove the 8 reverse DNS delegations for 10.67.24.0/21 from templates/10.in-addr.arpa.
  • Update the two authorized_keys files noted in phase 0.
  • Remove the old /21 from the homer prefix lists.
  • Release 10.67.24.0/21 in Netbox.

Rollback

Up to the end of phase 5, set disabled: false on the old pool and revert 1343024. Pods return to the old range as they are recreated. Both ranges stay permitted throughout, so neither state is broken.

Out of scope

  • Migrating the other clusters to detectLocalMode: InterfaceNamePrefix. @JMeybohm suggested doing this fleet-wide once it is proven here and making it the default option in our puppet manifests.

Details

Related Changes in Gerrit:
SubjectAuthorRepoBranchLines +/-
Btullisoperations/homer/publicmaster+0 -7
Btullisoperations/dnsmaster+0 -24
Btullisoperations/puppetproduction+5 -12
Btullisoperations/deployment-chartsmaster+0 -5
Cathal Mooneyoperations/dnsmaster+384 -0
Btullisoperations/puppetproduction+1 -1
Btullisoperations/puppetproduction+3 -8
Btullisoperations/deployment-chartsmaster+1 -0
Btullisoperations/puppetproduction+5 -5
Btullisoperations/puppetproduction+5 -5
Btullisoperations/deployment-chartsmaster+2 -0
Btullisoperations/puppetproduction+5 -0
Btullisoperations/puppetproduction+86 -7
Btullisoperations/dnsmaster+384 -0
Cathal Mooneyoperations/homer/publicmaster+5 -0
Show related patches Customize query in gerrit

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I have been looking into another method of doing this, which I think might be able to make this work, without downtime.
However, it would need a change to our kube-proxy configuration first.
I'm not certain about it, so I'd rather describe the reasoning here and see whether anyone can spot a hole in it, before I take it any further.

In T429773#12040868 I set aside the idea of simply adding a second IPPool, on the basis of T375845#10349049.

The first this is used to configure kube-proxy and it only supports one CIDR per IP family.
It is used to detect if traffic comes from this clusters pods

So kube-proxy takes only one CIDR per IP family, which is true, and it also suggests that adding a second IPPool might work as a second step.

So I started looking a bit more at what the clusterCIDR parameter does for us in puppet.

When a pod opens a connection to a Service, kube-proxy DNATs the packet to one of the backend pods. Before it does, it has to decide whether the client is itself a pod on this same node. If it is, kube-proxy can leave the source address alone, and the backend sees the real client pod's address. If it isn't, kube-proxy rewrites the source to the node's own IP, so that the reply comes back through this node and can be un-DNATed correctly.

That is the only thing clusterCIDR is used for. Its default way of making that decision is to ask "is the source address inside clusterCIDR?", which only works while there is exactly one pod range per family.
The upstream field documentation is quite explicit that this is its only consumer (kubernetes 1.31 branch, staging/src/k8s.io/kube-proxy/config/v1alpha1/types.go):

clusterCIDR is the CIDR range of the pods in the cluster. (For dual-stack clusters, this can be a comma-separated dual-stack pair of CIDR ranges.). When DetectLocalMode is set to ClusterCIDR, kube-proxy will consider traffic to be local if its source IP is in this range. (Otherwise it is not used.)

https://github.com/kubernetes/kubernetes/blob/release-1.31/staging/src/k8s.io/kube-proxy/config/v1alpha1/types.go

As far as I can tell, nothing else in our Puppet configuration consumes cluster_cidr either. In particular kube-controller-manager is passed neither --cluster-cidr nor --allocate-node-cidrs, since Calico is doing the IPAM.

The configuration change

kube-proxy can be asked to make the same decision a different way. detectLocalMode: InterfaceNamePrefix, with detectLocal.interfaceNamePrefix set to cali, tells it to treat traffic as local if it arrived on an interface whose name begins with that prefix, rather than by looking at the source address at all:

interfaceNamePrefix is an interface name prefix. When DetectLocalMode is set to LocalModeInterfaceNamePrefix, kube-proxy will consider traffic to be local if it originates from any interface whose name begins with this prefix.

cali is not an arbitrary choice here. It is Calico's own InterfacePrefix, which is how Felix itself distinguishes a workload interface from a host interface:

Calico distinguishes workload endpoints from host endpoints by a configurable prefix. The default for that prefix is cali... Interfaces that start with a value listed in InterfacePrefix are assumed to be workload interfaces.

https://docs.tigera.io/calico/latest/reference/host-endpoints/overview

So in this mode kube-proxy would be asking Calico's own question, using the prefix that Calico itself currently uses (FELIX_INTERFACEPREFIX=cali), rather than inferring the answer from an address range.

In that mode clusterCIDR is never read, so we could stop writing it to the kube-proxy configuration altogether.
That would mean making cluster_cidr an optional in the K8s::ClusterConfig type.
Every cluster other than dse-k8s would carry on setting it, and it would still be passed to kube-proxy wherever the ClusterCIDR mode is in use, but the type would no longer assume one IPPool per cluster.

One thing we would need to be careful about is that kube-proxy does not complain if it is left in ClusterCIDR mode with no clusterCIDR.
It would quietly treat no traffic as local and masquerade everything, so we would want the puppet catalog to fail in that case, rather than allowing it.

The effect for this ticket is that changing cluster_cidr in hiera stops being a cutover that has to be coordinated with the Calico change.

What the migration would then look like

This is close to Calico's documented procedure for moving from one IP pool to another (https://docs.tigera.io/calico/latest/networking/ipam/migrate-pools):

  1. Add 10.68.0.0/17 as a second entry in the IPPools map in calico-values.yaml. The chart iterates that map to generate both the IPPool resources and the BGP prefixAdvertisements, so this is a values-only change and the new range gets advertised automatically.
  2. Set disabled: true on the existing v4 pool. Existing pods and blocks carry on working, but Calico stops handing out new blocks or addresses from it.
  3. Roll the cluster with the sre.k8s.reboot-nodes cookbook. As each node is drained and comes back, its pods are recreated and pick up addresses from the new pool. After the first batch the cookbook cordons the nodes it hasn't reached yet, so evicted pods land only on nodes that have already been through the process, rather than bouncing back onto the old range. Calico releases the old blocks as they empty.
  4. Once no blocks remain in the old range, delete the old pool, delete the cluster_cidr for dse-k8s-eqiad in hiera, and tidy up.

What would have to be in place first

Because both ranges are live at the same time, every change here has to add the new range rather than replace the old one:

  • 10.68.0.0/17 added to the allow-pod-to-pod GlobalNetworkPolicy in helmfile.d/admin_ng/values/dse-k8s.yaml. We run a cluster-wide default-deny, and that policy currently lists the pod ranges literally, so without this the first migrated node's pods would be unable to reach anything.
  • A second dse-kubepods entry in modules/network/data/data.yaml. slice_network_constants matches the description as a substring of the subnet name, so this would update DSE_KUBEPODS_NETWORKS

Is this sound?

  • Does my reading of clusterCIDR above sound right, and is there anywhere else in our setup that depends on it that I might have missed?
  • Is detectLocalMode: InterfaceNamePrefix something we would be comfortable with in the shared k8s::proxy module, given it would be dse-k8s-eqiad only to begin with?
  • Would it be beneficial to migrate the other clusters to use this configuration method as well?

Change #1343023 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] k8s: Let kube-proxy detect local Pod traffic by interface name

https://gerrit.wikimedia.org/r/1343023

Change #1343024 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] hieradata: Detect local Pod traffic by interface name on dse-k8s-eqiad

https://gerrit.wikimedia.org/r/1343024

Thanks for the nice write up!

Is this sound?

  • Does my reading of clusterCIDR above sound right, and is there anywhere else in our setup that depends on it that I might have missed?
  • Is detectLocalMode: InterfaceNamePrefix something we would be comfortable with in the shared k8s::proxy module, given it would be dse-k8s-eqiad only to begin with?
  • Would it be beneficial to migrate the other clusters to use this configuration method as well?

Yes to all three! I would suggest to decouple that migration from this task for obvious reasons. It sounds easy enough to be implemented (in puppet) in a way that allows switching back and forth between the modes, potentially even on a per node basis, to validate this works as expected. If it does I think we should definitely migrate away from ClusterCIDR fleet wide.

I just checked on my assumption regarding this assertion.

Reverse DNS delegation for 10.68.0.0/17. Nothing currently depends on PTR records for Pod addresses.

While I think that this is actually tru, in that nothing currently depends on these reverse addresses, we have got some relevant configuration that allows us to delegate the reponsibility for these zones to the clusters.

So I think I will need to update the DNS repo for this, as all of the other pod zones appear here templates/10.in-addr.arpa.
This is related to work being undertaken on: T376291: Authdns: automate reverse DNS zone delegation for k8s pod IP ranges

BTullis updated the task description. (Show Details)

I have validated that the new IP range has been added to the nftables definitions for DSE_KUBEPODS_NETWORKS like this.

btullis@cephosd2001:/etc/nftables/sets$ sudo nft list set inet base DSE_KUBEPODS_NETWORKS_ipv4
table inet base {
	set DSE_KUBEPODS_NETWORKS_ipv4 {
		type ipv4_addr
		flags interval
		auto-merge
		elements = { 10.67.24.0/21, 10.68.0.0/17,
			     10.192.96.0/21 }
	}
}

And like this on a ferm based host.

btullis@deploy1003:/etc/ferm$ sudo grep DSE_KUBEPODS_NETWORKS conf.d/00_defs
@def $DSE_KUBEPODS_NETWORKS = (10.67.24.0/21 10.68.0.0/17 2620:0:861:302::/64 10.192.96.0/21 2620:0:860:308::/64 );

I also checked that it had been added to $DOMAIN_NETWORKS and $PRODUCTION_NETWORKS in similar ways.

Change #1343650 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/dns@master] dse-k8s: Delegate reverse DNS for the second eqiad Pod range

https://gerrit.wikimedia.org/r/1343650

I was wrong about the DNS, although I am not sure that anything really depends on it yet.

I filed dse-k8s: Delegate reverse DNS for the second eqiad Pod range to update the 10.in-addr.arpa zone with the required delegations.

Change #1343650 merged by Btullis:

[operations/dns@master] dse-k8s: Delegate reverse DNS for the second eqiad Pod range

https://gerrit.wikimedia.org/r/1343650

Change #1343023 merged by Btullis:

[operations/puppet@production] k8s: Let kube-proxy detect local Pod traffic by interface name

https://gerrit.wikimedia.org/r/1343023

Change #1343024 merged by Btullis:

[operations/puppet@production] hieradata: Detect local Pod traffic by interface name on dse-k8s-eqiad

https://gerrit.wikimedia.org/r/1343024

I have been testing the change on dse-k8s-worker1001 and it seems to be working with: detectLocalMode: InterfaceNamePrefix and detectLocal.interfaceNamePrefix: cali present, as well as clusterCIDR absent

Firstly, I checked that we have entries matching cali in the nat table, after puppet restarted kube-proxy.

btullis@dse-k8s-worker1001:~$ sudo puppet agent --enable
btullis@dse-k8s-worker1001:~$ sudo run-puppet-agent
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Warning: The current total number of facts: 4218 exceeds the number of facts limit: 2048
Info: Caching catalog for dse-k8s-worker1001.eqiad.wmnet
Info: Applying configuration version '(d4f7fc3195) Btullis - hieradata: Detect local Pod traffic by interface name on dse-k8s-eqiad'
Notice: /Stage[main]/K8s::Proxy/File[/etc/kubernetes/kube-proxy-config.yaml]/content: 
--- /etc/kubernetes/kube-proxy-config.yaml	2026-03-26 11:39:42.640598022 +0000
+++ /tmp/puppet-file20260922-2892100-einthd	2026-09-22 11:02:12.163230719 +0000
@@ -4,9 +4,11 @@
 hostnameOverride: dse-k8s-worker1001.eqiad.wmnet
 clientConnection:
   kubeconfig: "/etc/kubernetes/proxy.conf"
-clusterCIDR: 10.67.24.0/21
 mode: iptables
 metricsBindAddress: 0.0.0.0
+detectLocalMode: InterfaceNamePrefix
+detectLocal:
+  interfaceNamePrefix: cali
 nodePortAddresses:
 - 0.0.0.0/0
 - "::/0"

Notice: /Stage[main]/K8s::Proxy/File[/etc/kubernetes/kube-proxy-config.yaml]/content: content changed '{sha256}c737f896ca0c421f9cc403e2bff8efa880a79143b9d2480148f04d989925ef91' to '{sha256}71f7969739b2ce50db078d509a8b86a1bed8d87bdaf33f72d1d5aa624bd87f36'
Info: /Stage[main]/K8s::Proxy/File[/etc/kubernetes/kube-proxy-config.yaml]: Scheduling refresh of Service[kube-proxy]
Notice: /Stage[main]/K8s::Proxy/Systemd::Service[kube-proxy]/Service[kube-proxy]: Triggered 'refresh' from 1 event
Notice: Applied catalog in 21.13 seconds

btullis@dse-k8s-worker1001:~$ sudo iptables-save -t nat | grep -c 'cali+'
498

Then I checked what the reverse DNS address came back with when looking up a pod's own IP address. I did this by enternig the network namespace of a pod on dse-k8s-worker1001.

btullis@dse-k8s-worker1001:~$ sudo crictl ps --name=spark-history-analytics-hadoop | grep spark-history-analytics-hadoop-7889976cb-6gvnm |grep -v tls| awk '{ print $1 }'
0c80b00edf846
btullis@dse-k8s-worker1001:~$ container_id=$(sudo crictl ps --name=spark-history-analytics-hadoop | grep spark-history-analytics-hadoop-7889976cb-6gvnm |grep -v tls| awk '{ print $1 }')
btullis@dse-k8s-worker1001:~$ container_root_pid=$(sudo crictl inspect ${container_id} | jq .info.pid)
btullis@dse-k8s-worker1001:~$ sudo nsenter --target ${container_root_pid} --net bash
root@dse-k8s-worker1001:/home/btullis# dig +nsid reflect.k8s.local.wmnet @10.67.32.3

; <<>> DiG 9.18.49-1~deb12u2-Debian <<>> +nsid reflect.k8s.local.wmnet @10.67.32.3
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52464
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags: do; udp: 1232
; NSID: 63 6f 72 65 64 6e 73 2d 36 38 35 66 63 36 66 35 36 38 2d 38 74 73 36 76 ("coredns-685fc6f568-8ts6v")
;; QUESTION SECTION:
;reflect.k8s.local.wmnet.	IN	A

;; ADDITIONAL SECTION:
reflect.k8s.local.wmnet. 0	IN	A	10.67.24.91
_udp.reflect.k8s.local.wmnet. 0	IN	SRV	0 0 43039 .

;; Query time: 0 msec
;; SERVER: 10.67.32.3#53(10.67.32.3) (UDP)
;; WHEN: Tue Sep 22 11:36:15 UTC 2026
;; MSG SIZE  rcvd: 166

We can see that the address is 10.67.24.91, which is in the DSE_KUBEPODS range.

This is in contrast to when I run that command from the host namespace on dse-k8s-worker1001, where we get the host's 10.64 address instead.

btullis@dse-k8s-worker1001:~$ dig reflect.k8s.local.wmnet @10.67.32.3

; <<>> DiG 9.18.49-1~deb12u2-Debian <<>> reflect.k8s.local.wmnet @10.67.32.3
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 52354
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 3
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
; COOKIE: 3401260dc3007ef2 (echoed)
;; QUESTION SECTION:
;reflect.k8s.local.wmnet.	IN	A

;; ADDITIONAL SECTION:
reflect.k8s.local.wmnet. 0	IN	A	10.64.0.38
_udp.reflect.k8s.local.wmnet. 0	IN	SRV	0 0 65145 .

;; Query time: 0 msec
;; SERVER: 10.67.32.3#53(10.67.32.3) (UDP)
;; WHEN: Tue Sep 22 11:44:55 UTC 2026
;; MSG SIZE  rcvd: 150

So I am happy that there is no regression. I think I will just reboot the host and check that it comes back cleanly, before re-enabling puppet on the other hosts.

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-worker1001.eqiad.wmnet

Host dse-k8s-ctrl1001.eqiad.wmnet rebooted by btullis@cumin1004 with reason: None

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-worker[1002-1014,1018-1028].eqiad.wmnet

So I think I will need to update the DNS repo for this, as all of the other pod zones appear here templates/10.in-addr.arpa.
This is related to work being undertaken on: T376291: Authdns: automate reverse DNS zone delegation for k8s pod IP ranges

Yeah the full automation for that needs to be rounded off. We got pretty far and then had some problems working out where the cronjob could run from and read from one repo, update the other one.

Anyhow.... I've a quick script I can run to generate all the NS delegations so @BTullis once you have the new range for the cluster documented in hieradata/common/kubernetes.yaml just let me know I can run it and generate the patch.

Change #1343998 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/deployment-charts@master] dse-k8s-eqiad: Add a second ipv4 pool to calico

https://gerrit.wikimedia.org/r/1343998

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-wdqs[1001-1003].eqiad.wmnet

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-wdqs-test1001.eqiad.wmnet

Change #1343998 merged by jenkins-bot:

[operations/deployment-charts@master] dse-k8s-eqiad: Add a second ipv4 pool to calico

https://gerrit.wikimedia.org/r/1343998

I have now added the new pool.

root@deploy1003:/srv/deployment-charts/helmfile.d/admin_ng# kube-env admin dse-k8s-eqiad
root@deploy1003:/srv/deployment-charts/helmfile.d/admin_ng# kubectl get IPPools
NAME                AGE
ipv4                3y212d
ipv4-10-68-0-0-17   73s
ipv6                3y212d
root@deploy1003:/srv/deployment-charts/helmfile.d/admin_ng# kubectl get IPPools ipv4-10-68-0-0-17 -oyaml
apiVersion: crd.projectcalico.org/v1
kind: IPPool
metadata:
  annotations:
    meta.helm.sh/release-name: calico
    meta.helm.sh/release-namespace: kube-system
  creationTimestamp: "2026-09-23T14:45:11Z"
  generation: 1
  labels:
    app.kubernetes.io/instance: calico
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: calico
    app.kubernetes.io/version: 3.29.1
    helm.sh/chart: calico-0.4.0
  name: ipv4-10-68-0-0-17
  resourceVersion: "1784821515"
  uid: d99a703d-6af7-4386-9cdb-6e017b1ecdc3
spec:
  cidr: 10.68.0.0/17
  ipipMode: Never
  vxlanMode: Never

Change #1344327 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] dse-k8s-eqiad: put dse-k8s-worker1015 back into service

https://gerrit.wikimedia.org/r/1344327

Change #1344327 merged by Btullis:

[operations/puppet@production] dse-k8s-eqiad: put dse-k8s-worker1015 back into service

https://gerrit.wikimedia.org/r/1344327

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-worker1015.eqiad.wmnet

Change #1344597 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] dse-k8s-eqiad: put dse-k8s-worker1016 back into service

https://gerrit.wikimedia.org/r/1344597

Change #1344597 merged by Btullis:

[operations/puppet@production] dse-k8s-eqiad: put dse-k8s-worker1016 back into service

https://gerrit.wikimedia.org/r/1344597

Host dse-k8s-worker1016.eqiad.wmnet rebooted by btullis@cumin1004 with reason: None

Things look OK on this now. I have re-added dse-k8s-worker1015 and dse-k8s-worker1016 back into the cluster.
dse-k8s-worker1016 has picked up the first of the new ipamblocks fromthe new pool.

root@deploy1003:/srv/deployment-charts/helmfile.d/admin_ng# kubectl get ipamblocks.crd.projectcalico.org 10-68-6-192-26 -oyaml|head -n 12
apiVersion: crd.projectcalico.org/v1
kind: IPAMBlock
metadata:
  annotations:
    projectcalico.org/metadata: '{"creationTimestamp":null}'
  creationTimestamp: "2026-09-24T08:58:57Z"
  generation: 10
  name: 10-68-6-192-26
  resourceVersion: "1787153833"
  uid: 28856639-00c7-4710-94e4-830328c48e25
spec:
  affinity: host:dse-k8s-worker1016.eqiad.wmnet

Now we can see that pods on this host are running with these addresses.

image.png (2,383×633 px, 515 KB)

Change #1344628 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/deployment-charts@master] dse-k8s-eqiad: Disable the smaller, original ipv4 ippool

https://gerrit.wikimedia.org/r/1344628

Change #1344631 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] clouddumps: Allow the new IP Pool in dse-k8s-eqiad to ssh to clouddumps

https://gerrit.wikimedia.org/r/1344631

Change #1344628 merged by jenkins-bot:

[operations/deployment-charts@master] dse-k8s-eqiad: Disable the smaller, original ipv4 ippool

https://gerrit.wikimedia.org/r/1344628

The old pool is confirmed disabled.

root@deploy1003:/srv/deployment-charts/helmfile.d/admin_ng# kubectl get ippools -o custom-columns='NAME:.metadata.name,CIDR:.spec.cidr,DISABLED:.spec.disabled'
NAME                CIDR                  DISABLED
ipv4                10.67.24.0/21         true
ipv4-10-68-0-0-17   10.68.0.0/17          <none>
ipv6                2620:0:861:302::/64   <none>

Confirmed that new pods are being allocated addresses from the new blocks.

root@deploy1003:/srv/deployment-charts/helmfile.d/admin_ng# kubectl get pods -A -o json | jq -r '
  .items[] | select(.status.podIP != null)
  | if   (.status.podIP | startswith("10.68.")) then "new"
    elif (.status.podIP | startswith("10.67.")) then "OLD"
    else "host-network" end' | sort | uniq -c
     98 host-network
     23 new
    535 OLD

The next thing to do is to initiate a rolling reboot of dse-k8s-eqiad.

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-wdqs[1001-1003].eqiad.wmnet

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-wdqs-test1001.eqiad.wmnet

Roll-reboot of nodes in dse-eqiad cluster started by btullis:

  • dse-k8s-worker[1001-1016,1018-1028].eqiad.wmnet

Change #1344690 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] dse-k8s-eqiad: Put dse-k8s-worker1017 back into service

https://gerrit.wikimedia.org/r/1344690

Change #1344690 merged by Btullis:

[operations/puppet@production] dse-k8s-eqiad: Put dse-k8s-worker1017 back into service

https://gerrit.wikimedia.org/r/1344690

Host dse-k8s-worker1017.eqiad.wmnet rebooted by btullis@cumin1004 with reason: None

Change #1344631 merged by Btullis:

[operations/puppet@production] clouddumps: Allow the new IP Pool in dse-k8s-eqiad to ssh to clouddumps

https://gerrit.wikimedia.org/r/1344631

Change #1345933 had a related patch set uploaded (by Cathal Mooney; author: Cathal Mooney):

[operations/dns@master] Add reverse zone delegations for new dse-k8s-eqiad range 10.68.0.0/17

https://gerrit.wikimedia.org/r/1345933

Change #1345933 abandoned by Cathal Mooney:

[operations/dns@master] Add reverse zone delegations for new dse-k8s-eqiad range 10.68.0.0/17

Reason:

seems i missed this had already been done

https://gerrit.wikimedia.org/r/1345933

Change #1345971 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/puppet@production] dse-k8s-eqiad: Retire the old Pod IP range

https://gerrit.wikimedia.org/r/1345971

Change #1345973 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/deployment-charts@master] dse-k8s-eqiad: Remove the old Pod IP range

https://gerrit.wikimedia.org/r/1345973

Change #1345974 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/dns@master] dse-k8s: Remove the reverse DNS delegations for the old Pod range

https://gerrit.wikimedia.org/r/1345974

Change #1345973 merged by jenkins-bot:

[operations/deployment-charts@master] dse-k8s-eqiad: Remove the old Pod IP range

https://gerrit.wikimedia.org/r/1345973

Change #1345971 merged by Btullis:

[operations/puppet@production] dse-k8s-eqiad: Retire the old Pod IP range

https://gerrit.wikimedia.org/r/1345971

Change #1345974 merged by Btullis:

[operations/dns@master] dse-k8s: Remove the reverse DNS delegations for the old Pod range

https://gerrit.wikimedia.org/r/1345974

Change #1346596 had a related patch set uploaded (by Btullis; author: Btullis):

[operations/homer/public@master] dse-k8s: remove the old POD IPv4 block 10.67.24.0/21 from prefix lists

https://gerrit.wikimedia.org/r/1346596

Change #1346596 merged by jenkins-bot:

[operations/homer/public@master] dse-k8s: remove the old POD IPv4 block 10.67.24.0/21 from prefix lists

https://gerrit.wikimedia.org/r/1346596

So I think I will need to update the DNS repo for this, as all of the other pod zones appear here templates/10.in-addr.arpa.
This is related to work being undertaken on: T376291: Authdns: automate reverse DNS zone delegation for k8s pod IP ranges

Yeah the full automation for that needs to be rounded off. We got pretty far and then had some problems working out where the cronjob could run from and read from one repo, update the other one.

Anyhow.... I've a quick script I can run to generate all the NS delegations so @BTullis once you have the new range for the cluster documented in hieradata/common/kubernetes.yaml just let me know I can run it and generate the patch.

Sorry for not getting back to you about this @cmooney and thanks for deploying https://gerrit.wikimedia.org/r/1346596

I don't know quite how it will affect your automation work in T376291, but now that we use the detectLocalMode: InterfaceNamePrefix method and can support multiple IPPools concurrently, there is no need for the cluster_cidr parameter in hieradata/common/kubernetes.yaml. So I have now removed that parameter, at least from dse-k8s-eqiad in this patch.

Technically, we could still add it back, as we are only using one IPv4 CIDR again, but it doesn't strike me as necessary. I hope that's OK with you, but let me know if you think otherwise.

I have deleted the 10.67.24.0/21 prefix from netbox.

image.png (1,272×877 px, 205 KB)

BTullis updated the task description. (Show Details)
BTullis mentioned this in Unknown Object (Task).Tue, Nov 3, 10:02 PM