Kubeadm
Clouder uses Kubeadm to bootstrap production-grade Kubernetes clusters on cloud VMs with built-in support for CRIU (Checkpoint/Restore In Userspace).
This design document describes how Clouder orchestrates Kubeadm across Azure (and other cloud providers) to create clusters optimized for pod checkpoint and restore workflows.
Overview
┌─────────────────────────────────────────────────────────┐
│ Clouder CLI │
│ │
│ clouder kubernetes create <cluster-name> --provider azure │
└───────────────────────┬─────────────────────────────────┘
│
┌────────────▼────────────┐
│ 1. Provision VMs │
│ (Azure / OVH / ...) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 2. Install prereqs │
│ (containerd, CRIU, │
│ Kubeadm, kubelet) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 3. Kubeadm init │
│ (control plane node) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 4. Kubeadm join │
│ (worker nodes) │
└────────────┬────────────┘
│
┌────────────▼────────────┐
│ 5. Post-setup │
│ (CNI, CRIU config, │
│ storage, monitoring) │
└─────────────────────────┘
Cluster Topology
A Clouder-managed cluster consists of:
| Role | Count | Purpose | Recommended VM Size |
|---|---|---|---|
| Control Plane | 1 (or 3 for HA) | API server, etcd, scheduler, controller | Standard_B4ms (4 vCPUs, 16 GB) |
| Worker | 1+ | Run application pods | Standard_B4ms or larger |
| GPU Worker | 0+ | ML/AI workloads | Standard_NC6s_v3 (V100 GPU) |
Cloud Provider Setup
Use one of the sections below before running clouder kubeadm create.
Azure
Clouder supports Azure for Kubeadm VM provisioning, cluster setup, storage bootstrap, and ingress load balancer integration.
Prerequisites
- An Azure account — sign up at https://azure.microsoft.com/free
- Azure CLI installed
Authentication Methods
Method 1 (development): Azure CLI login
az login
az account show
clouder azure configure
Method 2 (production/CI): Service Principal
# Get subscription ID
az account show --query id -o tsv
# Create a service principal and role assignment
az ad sp create-for-rbac \
--name "clouder-cli" \
--role Contributor \
--scopes "/subscriptions/<SUBSCRIPTION_ID>" \
-o json
# Configure Clouder
clouder azure configure \
--subscription-id <SUBSCRIPTION_ID> \
--tenant-id <TENANT_ID> \
--client-id <CLIENT_ID> \
--client-secret <CLIENT_SECRET> \
--no-interactive
Credentials are stored in ~/.clouder/clouds/azure/azure.yaml with mode 600.
Verify Azure Access
clouder azure
clouder azure subscriptions
clouder azure regions
clouder azure resource-groups
clouder azure vm-ls
Azure Kubeadm cluster creation flow
# Initialize and select context
clouder ctx init
clouder ctx sync
clouder ctx set azure <SUBSCRIPTION_ID>
# Create VM set (1 master + 3 workers by default)
clouder kubeadm create my-cluster --region eastus --workers 3
# Setup Kubernetes + CRIU + Azure storage
clouder kubeadm setup my-cluster
# Fetch kubeconfig
clouder kubeadm get-config my-cluster
Optional environment variables:
export AZURE_SUBSCRIPTION_ID=<SUBSCRIPTION_ID>
export AZURE_TENANT_ID=<TENANT_ID>
export AZURE_CLIENT_ID=<CLIENT_ID>
export AZURE_CLIENT_SECRET=<CLIENT_SECRET>
Azure troubleshooting
DefaultAzureCredential failed: runaz loginand verify subscription access.AuthorizationFailed: verify role assignments for the app/service principal.SubscriptionNotFound: confirm selected subscription is active and correct.
AWS
Clouder supports AWS for Kubeadm VM provisioning, cluster setup, storage bootstrap, and ingress load balancer integration.
Prerequisites
- An AWS account
- AWS CLI installed
- An EC2 key pair in your target region
Authentication Methods
Method 1 (development): Access keys/profile
aws configure
aws sts get-caller-identity
Method 2 (enterprise): AWS SSO
aws configure sso
aws sso login
aws sts get-caller-identity
Optional environment variables:
export AWS_ACCESS_KEY_ID=<ACCESS_KEY_ID>
export AWS_SECRET_ACCESS_KEY=<SECRET_ACCESS_KEY>
export AWS_REGION=us-east-1
export AWS_DEFAULT_REGION=us-east-1
Verify AWS access
clouder aws info
clouder aws regions
clouder aws vm-ls --region us-east-1
AWS Kubeadm cluster creation flow
# Initialize and select context
clouder ctx init
clouder ctx sync
clouder ctx set aws <AWS_ACCOUNT_ID>
# Create VM set (1 master + 3 workers by default)
clouder kubeadm create my-cluster --region us-east-1 --workers 3
# Setup Kubernetes + CRIU + AWS storage/LB integration
clouder kubeadm setup my-cluster
# Fetch kubeconfig
clouder kubeadm get-config my-cluster
AWS troubleshooting
Unable to locate credentials: runaws configureoraws sso login.AuthFailureorUnauthorizedOperation: verify IAM permissions and region.- No EC2 key pair found: create/import one in the selected region before
create.
CLI Quick Start
Use the following command sequence for day-0 cluster setup and day-1 operations.
Install and discover commands
pip install clouder
clouder --version
clouder --help
Context and cloud setup
clouder ctx init
clouder ctx sync
clouder ctx ls
clouder ctx show
# Azure setup
clouder azure configure
clouder azure
# AWS setup validation
clouder aws info
Common operations
# VM inventory
clouder azure vm-ls
clouder aws vm-ls --region us-east-1
# SSH and keys
clouder ssh-key ls
clouder ssh-key create my-key
clouder ssh <vm-name>
# S3 buckets
clouder s3 ls
clouder s3 create my-bucket
# Operator and info
clouder operator start
clouder info ctx
clouder info me
Step 1: VM Provisioning
Clouder provisions VMs using the selected cloud provider context. For a cluster, multiple VMs are created with shared networking and role-based naming.
# Azure example
clouder ctx set azure <SUBSCRIPTION_ID>
clouder kubeadm create my-cluster --region eastus --workers 2
# AWS example
clouder ctx set aws <AWS_ACCOUNT_ID>
clouder kubeadm create my-cluster --region us-east-1 --workers 2
This will:
- Create VMs:
my-cluster-master,my-cluster-node-1,my-cluster-node-2 - Tag all VMs with
clouder-cluster=my-clusterand their role - Set up a shared virtual network and subnet
- Configure cloud firewall/security group rules for Kubernetes ports
Required Ports
| Port | Protocol | Purpose |
|---|---|---|
| 6443 | TCP | Kubernetes API server |
| 2379-2380 | TCP | etcd client/peer |
| 10250 | TCP | kubelet API |
| 10259 | TCP | kube-scheduler |
| 10257 | TCP | kube-controller-manager |
| 30000-32767 | TCP | NodePort Services |
Step 2: Node Preparation
Clouder connects to each VM via SSH and runs preparation scripts:
Container Runtime (containerd)
# Install containerd 2.x from Docker repo, and CRIU
apt-get update && apt-get install -y containerd.io criu
# Configure containerd for checkpoint/restore
cat > /etc/containerd/config.toml <<EOF
version = 2
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc]
runtime_type = "io.containerd.runc.v2"
[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]
SystemdCgroup = true
EOF
systemctl restart containerd
Kubernetes Components
# Install Kubeadm, kubelet, kubectl
apt-get install -y apt-transport-https ca-certificates curl gpg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key | \
gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] \
https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /' | \
tee /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install -y kubelet Kubeadm kubectl
apt-mark hold kubelet Kubeadm kubectl
CRIU Prerequisites
# Verify CRIU installation
criu check
# Enable kubelet feature gates for checkpoint/restore
cat > /var/lib/kubelet/config.yaml <<EOF
apiVersion: kubelet.config.k8s.io/v1beta1
kind: KubeletConfiguration
featureGates:
ContainerCheckpoint: true
EOF
Step 3: Control Plane Initialization
Clouder generates a Kubeadm init configuration and runs it on the control plane node: