Systems, part 3 of 3
Quick Recipes
Quick RecipesSystems
Welcome to the Quick Recipes section. Here you will find fast solutions and copy-paste commands for common problems across the technologies we cover.
Ansible
Run a playbook with a specific inventory
ansible-playbook -i inventory.ini playbook.yml
Check connectivity with hosts
ansible all -m ping
Docker
Clean up unused containers and images
docker system prune -a
View a container's logs
docker logs <container_name>
Kubernetes
List pods across all namespaces
kubectl get pods --all-namespaces
Apply a YAML manifest
kubectl apply -f deployment.yaml
HAProxy
Reload the configuration with no downtime
sudo systemctl reload haproxy
View real-time statistics
echo "show stat" | socat stdio /var/run/haproxy.sock
Networking
Show the routing table
ip route show
Show network interfaces
ip addr show
Proxmox
Update the system
apt update && apt upgrade
Create a VM from the CLI
qm create 100 --name myvm --memory 2048 --net0 virtio,bridge=vmbr0
OpenStack
List instances
openstack server list
Create a network
openstack network create mynetwork
Terraform
Initialize a directory
terraform init
Plan changes
terraform plan
Ceph
Check cluster health
ceph status
List OSDs
ceph osd tree
Contribute
If you have a quick recipe you think would be useful, send a PR or open an issue in our repository!
Links to full guides
For detailed explanations and complete guides, see:
- Ansible Base - Complete Ansible guide
- Docker Base - Complete Docker guide
- Kubernetes Base - Complete Kubernetes guide
- HAProxy Base - Complete HAProxy guide
- Networking - Networking guides
- Proxmox VE - Complete Proxmox guide
- OpenStack - Complete OpenStack guide
- Terraform Base - Complete Terraform guide
- Ceph Base - Complete Ceph guide
Need help with troubleshooting? Check out our troubleshooting section.