Comments (1)
@Mammut-Felix Interesting, the only thing that comes to mind is that your base image are older and do not have semanage installed.
-
Check Image Version and Update if Necessary:
- Determine when your current images were created. If they are a few months old, they might need an update.
- Refer to the pinned discussion about upgrading to version 2.x for detailed steps on updating your images. Updated images shouldn't have the issue you're encountering.
-
Verify Node Status:
- Before proceeding with any changes, ensure all nodes in your cluster are active. Use the command
kubectl get nodes
to check their status.
- Before proceeding with any changes, ensure all nodes in your cluster are active. Use the command
-
Backup etcd on Another Control Plane Node:
- SSH into another control plane (cp) node, if possible.
- Create a backup of etcd using the k3s CLI. For specific commands, consult
k3s -h
.
-
Increase the Count of the First cp Node Pool:
- Adjust the node count of the first cp node pool to 2 (up from 1).
- Apply these changes to update the cluster configuration.
-
Cordon, Drain, and Delete the Original Node:
- Cordon the original node (the one you plan to replace) using
kubectl cordon [nodename]
. - Drain the node using
kubectl drain [nodename]
. - Delete the node from the cluster using
kubectl delete node [nodename]
. - Remove the node from your cloud provider using
hcloud delete node [nodename or identifier]
.
- Cordon the original node (the one you plan to replace) using
-
Recreate the Node with Terraform:
- Run
terraform apply
to recreate the node. - This new node should initialize and automatically join the cluster, syncing with the second node in the first node pool.
- Run
-
Repeat for the Second Node in the First cp Node Pool:
- Once the new node is up and running, repeat the cordon, drain, delete, and removal steps for the second node in the first cp node pool (the one used for initialization).
-
Restore Node Pool Count and Apply Changes:
- After the second node is successfully replaced, reset the node count of the first cp node pool back to 1.
- Apply these final changes to complete the process.
By following these steps, you should be able to replace the nodes effectively. Each step is crucial for maintaining cluster stability and ensuring a smooth transition to the updated nodes.
In my own testing, the method above worked. But maybe make a full cluster backup first, enhance the first step of doing an etcd backup. There is also a vmware tool called Velero that you can use to make cluster backups.
from terraform-hcloud-kube-hetzner.
Related Issues (20)
- [Feature Request]: Allow a reboot inside of preinstall_exec HOT 1
- Instance type cx22 is not available (currently or anymore) HOT 2
- [Bug]: microos snapshots - Error: no image found matching the selection
- Cloud-init (and therefore terraform) are failing, how to fix it? HOT 23
- Load Balancer would be newly created HOT 1
- [Bug]: initial cloud init failing HOT 2
- [Feature Request]: Add taint toleration to cluster-autoscaler
- [Bug]: exec ./cluster-autoscaler: argument list too long
- [Bug]: On scaling my cluster I got an error with terraform
- [Bug]: Outgoing TCP connections fail on newly created cluster HOT 1
- [Feature Request]: output hostname, ipv4, ipv6 for agent and control plane nodes
- [Bug]: Nodes restarting in emergency mode HOT 2
- [Bug]: [error] 26#26: *1250 connect() failed (111: Connection refused) while connecting to upstream, client: 62.163.30.253, HOT 1
- [Bug]: Cluster autoscaler will break after 6/9 HOT 1
- [Bug]: Enabling rancher after previously disabling it does not work
- [Bug]: hcloud-csi-node hcloud-csi-controller constantly restarting HOT 1
- [Feature Request]: Add floating IPs for wireguard hybrid cloud / multicluster
- [Bug]: Terraform failing if csi is disabled (disable_hetzner_csi) and `hetzner_csi_version` not set
- [Bug]: Primary IP limit exceeded HOT 5
- [Bug]: Cluster autoscaler not creating any nodes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-hcloud-kube-hetzner.