Skip to content

Linux Container Orchestration

Mattscreative edited this page Dec 5, 2025 · 2 revisions

Linux Container Orchestration Guide

Complete beginner-friendly guide to container orchestration on Linux, covering Arch Linux, CachyOS, and other distributions including Kubernetes, Docker Swarm, and container management.


Table of Contents

  1. Kubernetes Setup
  2. Docker Swarm
  3. Container Management
  4. Troubleshooting

Kubernetes Setup

Install kubectl

Install kubectl:

# Arch/CachyOS
sudo pacman -S kubectl

# Debian/Ubuntu
sudo apt install kubectl

# Fedora
sudo dnf install kubectl

# Verify
kubectl version --client

Install minikube

Install minikube:

# Arch/CachyOS
yay -S minikube

# Debian/Ubuntu
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
sudo install minikube-linux-amd64 /usr/local/bin/minikube

# Fedora
sudo dnf install minikube

# Start minikube
minikube start

# Check status
kubectl get nodes

Install k3s

Install k3s (lightweight Kubernetes):

# Install k3s
curl -sfL https://get.k3s.io | sh

# Check status
sudo systemctl status k3s

# Get kubeconfig
sudo cat /etc/rancher/k3s/k3s.yaml

Docker Swarm

Initialize Swarm

Setup Swarm:

# Install Docker
# Arch/CachyOS
sudo pacman -S docker

# Debian/Ubuntu
sudo apt install docker.io

# Fedora
sudo dnf install docker

# Start Docker
sudo systemctl enable --now docker

# Initialize swarm
docker swarm init

# Join swarm (on other nodes)
docker swarm join --token TOKEN manager-ip:2377

Manage Swarm

Swarm commands:

# List nodes
docker node ls

# Create service
docker service create --name myservice nginx

# Scale service
docker service scale myservice=3

# List services
docker service ls

# Remove service
docker service rm myservice

Container Management

Docker Compose

Install Docker Compose:

# Arch/CachyOS
sudo pacman -S docker-compose

# Debian/Ubuntu
sudo apt install docker-compose

# Fedora
sudo dnf install docker-compose

Create compose file:

# Create compose file
vim docker-compose.yml

Example:

version: '3'
services:
  web:
    image: nginx
    ports:
      - "80:80"
  db:
    image: postgres
    environment:
      POSTGRES_PASSWORD: password

Run:

# Start services
docker-compose up -d

# Stop services
docker-compose down

# View logs
docker-compose logs

Troubleshooting

Container Issues

Check containers:

# List containers
docker ps -a

# Check logs
docker logs container-name

# Inspect
docker inspect container-name

# Execute command
docker exec -it container-name /bin/bash

Kubernetes Issues

Check cluster:

# Get nodes
kubectl get nodes

# Get pods
kubectl get pods

# Describe pod
kubectl describe pod pod-name

# View logs
kubectl logs pod-name

Summary

This guide covered container orchestration for Arch Linux, CachyOS, and other distributions, including Kubernetes, Docker Swarm, and container management.


Next Steps


This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.

Clone this wiki locally