Component IP Change Impact and Remediation
IP or hostname changes in infrastructure components can affect Apinizer connection points, certificates, and cluster discovery. This page consolidates what breaks when a change is made, whether Apinizer Workers keep running, and the recommended remediation order.
Before starting IP or hostname changes, plan a maintenance window if possible. Pay attention to replica set and Elasticsearch cluster fault tolerance ((n-1)/2).
Impact Summary
The Apinizer Worker column shows whether existing Worker pods continue to process API traffic. Even when Workers keep running, Manager access, log writes, or a new publish (re-publish) may still be affected.
| Component / Scenario | What breaks | Apinizer Worker | Remediation section |
|---|---|---|---|
| Kubernetes Control Plane IP | API server access, kubeconfig, apiserver certificates | Runs | Control Plane IP change |
| Kubernetes → Virtual IP migration | Control-plane access, join endpoint, HA configuration | Stops | Virtual IP migration |
| Kubernetes Worker node IP | Node NotReady, NodePort / access address | Stops on the affected node | Worker node IP change |
| MongoDB node IP | Replica set membership, Apinizer MongoDB connection | Stops | MongoDB IP change |
| MongoDB hostname | Replica set identity, auth conflicts | Stops | MongoDB hostname change |
| Elasticsearch node IP | Cluster discovery, log writes, Kibana access | Runs | Elasticsearch IP change |
| Apinizer access and connections | Manager / Gateway access, log connector, secret URI | Runs | Apinizer-side updates |
Recommended Remediation Order
- Backup — Critical configuration files (move them with
mv; delete only after verification) - Data layer — MongoDB, then Elasticsearch (Apinizer logs depend on these layers)
- Kubernetes — Control-plane, VIP migration if needed, worker nodes
- Apinizer — MongoDB secret / URI, Elasticsearch Connection, Gateway Access URL
- Verification — Verification checklist
Kubernetes Control Plane IP Change
When the control-plane server IP address changes, Kubernetes configuration files and apiserver certificates must be updated. Running Apinizer Worker pods continue to process API traffic; new scheduling or pod restarts are not possible while the API server is unreachable.
Configuration files
Update IP addresses to the new value in the following files:
/etc/kubernetes/admin.conf
/etc/kubernetes/controller-manager.conf
/etc/kubernetes/kubelet.conf
/etc/kubernetes/scheduler.conf
/etc/kubernetes/manifests/etcd.yaml
/etc/kubernetes/manifests/kube-apiserver.yaml
Certificate renewal
Move existing apiserver certificates aside instead of deleting them, then regenerate:
cd /etc/kubernetes/pki
sudo mkdir -p /etc/kubernetes/pki.backup
sudo mv apiserver.crt apiserver.key apiserver-kubelet-client.crt apiserver-kubelet-client.key /etc/kubernetes/pki.backup/
sudo kubeadm init phase certs apiserver-kubelet-client
sudo kubeadm init phase certs apiserver
sudo systemctl restart kubelet
Some warnings during certificate creation can be ignored. If issues persist, see Kubernetes Certificate Check and Renewal.
Kubeconfig update
Copy the updated config for cluster access:
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
After cluster access and node status are verified, delete the backups:
sudo rm -rf /etc/kubernetes/pki.backup
Kubernetes Virtual IP Migration
In environments with multiple control-plane nodes, the cluster is reconfigured to place control-plane access behind a Virtual IP (VIP) or load balancer. This scenario differs from a single control-plane IP change; it is for HA migration. Apinizer Workers do not run during this operation.
Example environment: control-plane-1, control-plane-2, control-plane-3, worker-1, worker-2 — cluster started with kubeadm init on control-plane-1.
Define a Virtual IP on the load balancer; all control-plane access must be routed to this VIP on port 6443.
If you are not using a load balancer, see Kubernetes Setup — High Availability for Keepalived and HAProxy steps to create a virtual IP.
Removing nodes from the cluster
Run the following on the other control-plane nodes (control-plane-2, control-plane-3) except control-plane-1, and on the worker nodes (worker-1, worker-2):
sudo kubeadm reset
From control-plane-1, remove the other control-plane and worker nodes from the cluster:
kubectl delete node control-plane-2
kubectl delete node control-plane-3
kubectl delete node worker-1
kubectl delete node worker-2
In this scenario only control-plane-1 remains in the cluster. The other control-plane and worker nodes rejoin through the VIP.
Tasks on the control-plane-1 server
sudo systemctl stop kubelet
sudo systemctl stop containerd
Move files instead of deleting them. Also move certificates that must not be reused into the backup directory:
sudo mv -f /etc/kubernetes /etc/kubernetes.backup
sudo mv -f /var/lib/kubelet /var/lib/kubelet.backup
sudo mv -f ~/.kube/config ~/.kube/config.backup
sudo mkdir -p /etc/kubernetes/pki
sudo cp -r /etc/kubernetes.backup/pki /etc/kubernetes
sudo mkdir -p /etc/kubernetes.backup/removed-certs/etcd
sudo mv /etc/kubernetes/pki/apiserver.* /etc/kubernetes.backup/removed-certs/
sudo mv /etc/kubernetes/pki/etcd/peer.* /etc/kubernetes.backup/removed-certs/etcd/
sudo systemctl start containerd
sudo kubeadm init --pod-network-cidr "10.244.0.0/16" --control-plane-endpoint <VIRTUAL_IP> --upload-certs --ignore-preflight-errors=DirAvailable--var-lib-etcd
Note the kubeadm join commands; they will be used for worker and additional control-plane nodes.
Tasks on worker nodes
sudo systemctl stop kubelet
sudo systemctl stop containerd
sudo mv -f /etc/kubernetes /etc/kubernetes.backup
sudo mv -f /var/lib/kubelet /var/lib/kubelet.backup
sudo systemctl start containerd
sudo systemctl start kubelet
Run the kubeadm worker join command from control-plane-1 on the worker nodes.