45 lines
1.3 KiB
Markdown
45 lines
1.3 KiB
Markdown
|
|
# Node Management Commands for Raspberry Pi Scheduling Issues
|
||
|
|
|
||
|
|
## 1. Taint the Raspberry Pi Node (Recommended Approach)
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Find your Raspberry Pi node name
|
||
|
|
kubectl get nodes -o wide
|
||
|
|
|
||
|
|
# Taint the Raspberry Pi node to prevent scheduling (except for tolerating pods)
|
||
|
|
kubectl taint nodes <raspberry-pi-node-name> node-type=raspberry-pi:NoSchedule
|
||
|
|
|
||
|
|
# Alternative: Use a more descriptive taint
|
||
|
|
kubectl taint nodes <raspberry-pi-node-name> hardware=low-memory:NoSchedule
|
||
|
|
```
|
||
|
|
|
||
|
|
## 2. Label Nodes for Better Targeting
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Label your Raspberry Pi node
|
||
|
|
kubectl label nodes <raspberry-pi-node-name> node-type=raspberry-pi
|
||
|
|
kubectl label nodes <raspberry-pi-node-name> hardware=low-memory
|
||
|
|
|
||
|
|
# Label your more powerful nodes
|
||
|
|
kubectl label nodes <powerful-node-1> node-type=worker
|
||
|
|
kubectl label nodes <powerful-node-1> hardware=high-memory
|
||
|
|
kubectl label nodes <powerful-node-2> node-type=worker
|
||
|
|
kubectl label nodes <powerful-node-2> hardware=high-memory
|
||
|
|
```
|
||
|
|
|
||
|
|
## 3. Verify Node Configuration
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Check node labels and taints
|
||
|
|
kubectl describe nodes
|
||
|
|
|
||
|
|
# See which nodes have what resources available
|
||
|
|
kubectl describe nodes | grep -A 5 "Allocatable"
|
||
|
|
```
|
||
|
|
|
||
|
|
## 4. Remove Taint if Needed
|
||
|
|
|
||
|
|
```bash
|
||
|
|
# Remove the taint if you need to rollback
|
||
|
|
kubectl taint nodes <raspberry-pi-node-name> node-type=raspberry-pi:NoSchedule-
|
||
|
|
```
|