Test, deploy, iterate your Talos configurations easily
Automated deployment script for Talos Linux on any VMs with Kubernetes and Cilium CNI.
- Prerequisites
- Quick Start
- Configuration
- Deployment Process
- Output Files
- Usage After Deployment
- Troubleshooting
- Advanced Usage
- Security Notes
Ensure the following tools are installed on your system:
| Tool | Description | Installation Guide |
|---|---|---|
talosctl |
Talos CLI tool | Install |
kubectl |
Kubernetes CLI | Install |
helm |
Kubernetes package manager | Install |
envsubst |
Environment variable substitution | Part of gettext package |
yq |
YAML processor | Install |
The following files must exist in the deployment directory:
.
βββ deploy.sh # The deployment script
βββ patch.yaml # Base Talos configuration patches
βββ patch_controlplane.yaml # Control plane specific patches
- β IP address of the VM where Talos will be deployed, on my tests I used Bare-Metal Machine iso(metal-amd.iso) from https://factory.talos.dev
- β Harbor container registry credentials (username and password), If you dont have harbor or any proxy cache enabled repository you need to clean up it's definitions from patches.
- β Network CIDR for your local network where sandbox VM will run.
chmod +x deploy.shexport MASTER_IP=192.168.105.128
export HARBOR_CONTAINERD_USERNAME=your-username-here
export HARBOR_CONTAINERD_PASSWORD=your-password-here./deploy.shThat's it! The script will automatically handle the entire deployment process.
All configuration is done through environment variables. Here are the available options:
| Variable | Default | Required | Description |
|---|---|---|---|
MASTER_IP |
192.168.105.128 |
Yes | IP address of the Talos control plane node |
KUBERNETES_VERSION |
1.32.7 |
Yes | Kubernetes version to deploy |
HARBOR_REGISTRY_URL |
- | Yes | Harbor registry address |
HARBOR_CONTAINERD_USERNAME |
- | Yes | Harbor registry username |
HARBOR_CONTAINERD_PASSWORD |
- | Yes | Harbor registry password |
TALOS_INSTALL_IMAGE |
factory.talos.dev/installer/... |
Yes | Talos installer image |
DEX_URL |
- | Yes | Dex OIDC URL |
LOCAL_CIDR |
192.168.104.0/21 |
Yes | Local network CIDR |
CILIUM_VERSION |
1.18.3 |
Yes | Cilium CNI version |
TALOS_VERSION |
0.4.6 |
Yes | Talos Cloud Controller Manager version |
Create a file named config.env:
# Configuration
export MASTER_IP='192.168.0.18'
export KUBERNETES_VERSION='1.32.7'
export HARBOR_REGISTRY_URL='harbor.x.com'
export HARBOR_CONTAINERD_USERNAME='username'
export HARBOR_CONTAINERD_PASSWORD='password'
export DEX_URL='dex.x.com'
export TALOS_INSTALL_IMAGE='factory.talos.dev/installer/ce4c980550dd2ab1b17bbf2b08801c7eb59418eafe8f279833297925d67c7515:v1.9.6'
export LOCAL_CIDR='192.168.0.0/24'
export KUBECONFIG=$PWD/kubeconfig
export TALOSCONFIG=$PWD/talosconfig
# Helm Configuration
export CILIUM_VERSION='1.18.3'
export TALOS_CCM_VERSION='0.4.6'Then source it before running:
source config.env
./deploy.shThe script performs the following steps automatically:
- β Dependency Check - Verifies all required tools are installed
- β IP Validation - Ensures the provided IP address is valid
- β Secret Generation - Creates Talos secrets for cluster authentication
- β Configuration Processing - Processes patch files with environment variables
- β Talos Config Generation - Generates Talos machine configurations
- β Config Application - Applies configuration to the target node
- β Cluster Bootstrap - Bootstraps the Talos Kubernetes cluster
- β Kubeconfig Generation - Creates kubectl configuration file
- β Talos Cloud Controller Manager - Installs Talos CCM
- β Cilium Installation - Installs and configures Cilium CNI
- β Health Check - Waits for all pods to become ready
After successful deployment, the following files will be created in the deployment directory:
| File | Description |
|---|---|
secrets.yaml |
Talos cluster secrets |
talosconfig |
Talos CLI configuration |
kubeconfig |
Kubernetes CLI configuration |
controlplane.yaml |
Generated control plane configuration |
worker.yaml |
Generated worker configuration (if applicable) |
# Export kubeconfig
export KUBECONFIG=/path/to/deployment/kubeconfig
# Check cluster status
kubectl get nodes
kubectl get pods -A
# Deploy applications
kubectl apply -f your-app.yaml# Export talosconfig
export TALOSCONFIG=/path/to/deployment/talosconfig
# View cluster dashboard
talosctl -n <MASTER_IP> dashboard
# Check logs
talosctl -n <MASTER_IP> logs
# Get system information
talosctl -n <MASTER_IP> version
talosctl -n <MASTER_IP> health
talosctl -n <MASTER_IP> processesIf the script fails waiting for the node to become reachable:
Possible Causes:
- VM is not running
- Incorrect IP address
- Network connectivity issues
- Talos not booted properly
- Harbor setup problems
Solutions:
# Test connectivity
ping <MASTER_IP>
# Check if Talos is responding
talosctl --nodes <MASTER_IP> version --insecure
# Check Proxmox console for boot issuesIf Kubernetes API doesn't become ready:
Check Talos logs:
talosctl -n <MASTER_IP> logs controller-runtimeVerify bootstrap was successful:
talosctl -n <MASTER_IP> service kubelet statusIf pods fail to start after deployment:
Check pod status:
kubectl get pods -A
kubectl describe pod <pod-name> -n <namespace>Check Cilium status:
cilium status
kubectl -n kube-system logs -l app.kubernetes.io/name=ciliumIf you see image pull errors:
- β Verify credentials are correct
- β Check Harbor registry is accessible from the cluster
- β Verify the robot account has pull permissions
After the control plane is deployed, you can add worker nodes:
1. Generate worker configuration:
talosctl gen config talos1 https://<MASTER_IP>:6443 \
--with-secrets secrets.yaml \
--output-dir . \
--config-patch @/tmp/patch_out.yaml2. Apply to worker node:
talosctl apply-config --insecure \
--nodes <WORKER_IP> \
--file worker.yamlEdit patch.yaml or patch_controlplane.yaml to customize:
- π§ Network configuration
- π§ Kubelet settings
- π§ Container runtime options
- π§ System extensions
After editing, re-run the deployment script.
To upgrade Kubernetes version:
export KUBERNETES_VERSION=1.33.0
talosctl -n <MASTER_IP> upgrade-k8s --to $KUBERNETES_VERSIONThe script is idempotent and can be run multiple times. To iterate on your configuration:
- Modify your patch files
- Update environment variables if needed
- Re-run
./deploy.sh
The --force flags ensure configurations are regenerated and reapplied.
For issues and documentation related to:
- Talos Linux: Documentation
- Kubernetes: Documentation
- Cilium: Documentation
- Helm: Documentation
GPLv3 License