🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)
🕵️ SicherheitslückenHak5: Hackers Just Poisoned the Rust Supply Chain | Threat Wire(01.09.2026 um 14:00 Uhr)
🕵️ SicherheitslückenHak5: Hackers Found a Way Into Humanoid Robots | Threat Wire(04.09.2026 um 15:04 Uhr)
🔧 AI Nachrichten Bits und so #1021 (Passwort für Laufwerk)(31.08.2026 um 22:15 Uhr)
🔧 AI Nachrichten Bits und so #1022 (Wie Weißbier)(06.09.2026 um 20:39 Uhr)
🍏 iOS / Mac OSHue-App 6.0 ist da: das sind die Neuerungen(07.09.2026 um 17:21 Uhr)

🔧 Programmierung 🕛 kürzlich 3 Min Lesezeit
0

[k8s]After restarting the virtual machine, the kube-apiserver of k8s cannot start normally

↗ Quelle (dev.to)
🗣️ Stimme:

After restarting the device:




CODE


kubectl get node
The connection to the server x.x.x.x:6443 was refused - did you specify the right host or port?
systemctl status kube-apiserver prompts:

Unit kube-apiserver.service could not be found
There is no such service, so it is judged that the configuration file is wrong






Decided to reconstruct the K8S cluster



Solution:




CODE
# 1. Check if kubectl command is working
kubectl get node

# 2. Go to the home directory
cd ~

# 3. Check if the .kube directory exists
ll -a # List all files to check if .kube directory exists

# 4. Remove the .kube directory
rm -rf .kube/

# 5. Restart Docker service
systemctl restart docker # Restart Docker

# 6. Restart kubelet service
systemctl restart kubelet # Restart kubelet

# 7. Reset the Kubernetes setup
kubeadm reset # Reset Kubernetes cluster

# 8. Remove CNI configurations
rm -rf /etc/cni/ # Delete CNI configurations

# 9. Reinitialize Kubernetes with specific settings
kubeadm init --kubernetes-version=1.23.5 --apiserver-advertise-address=192.168.1.21 --image-repository registry.aliyuncs.com/google_containers --service-cidr=192.1.0.0/16 --pod-network-cidr=192.244.0.0/16

# 10. After successful initialization, configure Kubernetes for the user
mkdir -p $HOME/.kube # Create the .kube directory
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config # Copy admin config
sudo chown $(id -u):$(id -u) $HOME/.kube/config # Change ownership of the config file

# 11. Download the Flannel network configuration file
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml # Download Flannel YAML file

# 12. Copy the kube-flannel.yml file to /opt and apply it
sudo cp kube-flannel.yml /opt/ # Copy the Flannel YAML file to /opt directory
kubectl apply -f /opt/kube-flannel.yml # Apply the Flannel configuration

# After these steps, check the node status
kubectl get nodes # Check if the node is ready








  1. Issue with Flannel and CoreDNS Pods Not Starting:
    When checking the pods, Flannel and CoreDNS are not starting.




CODE


Error: Flannel is having an issue where it cannot obtain the necessary subnet lease. Specifically, the PodCIDR (assigned IP range for pods) 192.244.0.0/24 is not included within Flannel’s network configuration subnet 10.244.0.0/16.







  1. Fixing the Subnet Configuration:
    Edit the Flannel ConfigMap: To resolve the subnet issue, the Flannel ConfigMap needs to be updated.



First, inspect the Flannel Pod:




CODE

kubectl describe pod kube-flannel-ds-99grr -n kube-flannel # Describe the Flannel pod for detailed information






Check the logs:




CODE

kubectl logs kube-flannel-ds-fqvvv -n kube-flannel # Check the Flannel pod logs for errors
Error Explanation: The Flannel network plugin is unable to get a subnet lease because the PodCIDR 192.244.0.0/24 is not within the subnet 10.244.0.0/16 specified in Flannel’s configuration.






Solution: You can resolve this by modifying the Flannel network configuration:



Edit the Flannel ConfigMap:




CODE
kubectl edit configmap kube-flannel-cfg -n kube-flannel  # Edit the Flannel ConfigMap in the kube-flannel namespace






Change the subnet in the ConfigMap to match the required PodCIDR.



After modifying the subnet in the kube-flannel-cfg ConfigMap, Flannel should be able to allocate the necessary subnets and the pods should start successfully.

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
1 Quelle
Hackers Just Poisoned the Rust Supply Chain | Threat Wire
1 Quelle
Hackers Found a Way Into Humanoid Robots | Threat Wire
1 Quelle
Bits und so #1021 (Passwort für Laufwerk)
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten [k8s]After restarting the virtual machine, the kube-apiserver of k8s cannot start normally

Thematisch verwandte Begriffe: k8sAfter, restarting, virtual, machine · 6 Treffer

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...