Step‑by‑Step Binary Upgrade of a Kubernetes v1.30 Cluster to v1.32.3
This guide walks through upgrading a binary‑deployed Kubernetes cluster from v1.30.0 to v1.32.3, covering preparation, master and node upgrade procedures, deprecated API handling, validation, rollback, and best‑practice recommendations for production environments.
Upgrade Overview
The cluster is a binary‑installed Kubernetes setup running v1.30.0 on two CentOS 7 nodes (master1 192.168.10.10 and node1 192.168.10.20). The target version is v1.32.3, which adds performance, stability and security improvements and removes several deprecated flags and built‑in storage plugins.
Preparation
Download the v1.32.3 server binaries:
wget https://dl.k8s.io/v1.32.3/kubernetes-server-linux-amd64.tar.gz
tar -zxvf kubernetes-server-linux-amd64.tar.gz -C /opt
cd /opt/kubernetes/server/binBack up current binaries and configuration on each node.
Audit configuration files for deprecated fields (see Deprecated Items below).
Deprecated / Removed Items
.status.nodeInfo.kubeProxyVersion– no longer maintained; remove any monitoring reliance. --keep-terminated-pod-volumes – removed in v1.31; delete from kubelet flags.
Built‑in storage plugins CephFS and RBD – migrate workloads to CSI drivers (e.g., ceph-csi).
Legacy volume‑limit plugins ( AzureDiskLimits, EBSLimits, GCEPDLimits) – replace with NodeVolumeLimits. flowcontrol.apiserver.k8s.io/v1beta3 – replace with flowcontrol.apiserver.k8s.io/v1. ServiceAccountNodeAudienceRestriction – disabled by default in v1.32; ensure it remains off if previously enabled.
Master Node Upgrade (master1)
Backup
cd /usr/bin
cp kubectl kube-apiserver kube-controller-manager kube-scheduler etcd etcdctl -t /opt/backup/k8s-bak-$(date +%F)/
mkdir -p /opt/backup/k8s-bak-$(date +%F)Stop services
systemctl stop kube-apiserver
systemctl stop kube-controller-manager
systemctl stop kube-schedulerReplace binaries
cp /opt/kubernetes/server/bin/kubectl /usr/bin/
cp /opt/kubernetes/server/bin/kube-apiserver /usr/bin/
cp /opt/kubernetes/server/bin/kube-controller-manager /usr/bin/
cp /opt/kubernetes/server/bin/kube-scheduler /usr/bin/
chmod +x /usr/bin/kube*Update configuration – remove all deprecated flags listed above and adjust any API versions.
Reload daemon and start services
systemctl daemon-reexec
systemctl daemon-reload
systemctl start kube-apiserver
systemctl start kube-controller-manager
systemctl start kube-schedulerVerify
systemctl status kube-apiserver -l
kubectl version --shortNode Upgrade (node1)
Stop services and backup
systemctl stop kubelet
systemctl stop kube-proxy
mkdir -p /opt/backup/k8s-node-bak-$(date +%F)
mv /usr/bin/kubelet /usr/bin/kube-proxy /opt/backup/k8s-node-bak-$(date +%F)/Copy new binaries
scp /opt/kubernetes/server/bin/kubelet [email protected]:/usr/bin/
scp /opt/kubernetes/server/bin/kube-proxy [email protected]:/usr/bin/Update configuration – apply the same deprecation clean‑up as on the master; most flags (e.g., --cgroup-driver) are auto‑detected.
Restart services
systemctl daemon-reload
systemctl start kubelet
systemctl start kube-proxyPost‑Upgrade Validation
Check node readiness: kubectl get nodes -o wide (all nodes should show Ready).
Confirm component versions: kubectl version --short (client and server should report v1.32.3).
Inspect pod health across all namespaces: kubectl get pods -A and look for restarts or Pending pods.
Troubleshooting
Kubelet fails to start – run journalctl -xeu kubelet and verify kubeconfig/TLS alignment.
kube‑apiserver rejects flags – remove any deprecated flags identified during the audit.
Node shows NotReady – check container runtime and CNI plugin status.
Rollback Procedure
# Stop all services
systemctl stop kubelet kube-proxy kube-apiserver kube-controller-manager kube-scheduler
# Restore previous binaries
cp /opt/backup/k8s-bak-$(date +%F)/* /usr/bin/
# Restart services
systemctl start kube-apiserver
# (repeat for other components as needed)Recommendations
Test the upgrade in a staging environment before production.
Remove all deprecated parameters; refer to the official CHANGELOG (e.g., https://gitee.com/hanxianchao66/kubernetes/blob/master/CHANGELOG/CHANGELOG-1.32.md).
For HA clusters, upgrade master nodes sequentially and temporarily remove the API server from the load balancer.
Use kubectl drain to evict pods safely during node upgrades.
After a successful upgrade, take a fresh snapshot or backup of the cluster state.
Full-Stack DevOps & Kubernetes
Focused on sharing DevOps, Kubernetes, Linux, Docker, Istio, microservices, Spring Cloud, Python, Go, databases, Nginx, Tomcat, cloud computing, and related technologies.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
