- KVM module with connection configuration (local/SSH) - VM lifecycle management (create/start/stop/destroy/delete) - Network management (create/delete isolated virtual networks) - Volume management (create/delete storage volumes) - Example: OKD HA cluster deployment with OPNsense firewall - All VMs configured for PXE boot with isolated network The KVM module uses virsh command-line tools for management and is fully integrated with Harmony's architecture. It provides a clean Rust API for defining VMs, networks, and volumes. The example demonstrates deploying a complete OKD high-availability cluster (3 control planes, 3 workers) plus OPNsense firewall on an isolated network.
17 lines
1022 B
Markdown
17 lines
1022 B
Markdown
# Handy one liners for infrastructure management
|
|
|
|
### Delete all evicted pods from a cluster
|
|
|
|
```sh
|
|
kubectl get po -A | grep Evic | awk '{ print "-n " $1 " " $2 }' | xargs -L 1 kubectl delete po
|
|
```
|
|
> Pods are evicted when the node they are running on lacks the ressources to keep them going. The most common case is when ephemeral storage becomes too full because of something like a log file getting too big.
|
|
>
|
|
> It could also happen because of memory or cpu pressure due to unpredictable workloads.
|
|
>
|
|
> This means it is generally ok to delete them.
|
|
>
|
|
> However, in a perfectly configured deployment and cluster, pods should rarely, if ever, get evicted. For example, a log file getting too big should be reconfigured not to use too much space, or the deployment should be configured to reserve the correct amount of ephemeral storage space.
|
|
>
|
|
> Note that deleting evicted pods do not solve the underlying issue, make sure to understand why the pod was evicted in the first place and put the proper solution in place.
|