This guide provides step-by-step instructions for installing CAPT (Cluster API Provider Terraform).
Before you begin, ensure you have:
- kubectl installed and configured
- AWS credentials properly configured
- Crossplane with Terraform Provider installed
-
Create a kind cluster:
kind create cluster --name capt-test
-
Verify cluster status:
kubectl cluster-info
kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.yaml
-
Install clusterctl:
curl -L https://github.com/kubernetes-sigs/cluster-api/releases/download/v1.5.1/clusterctl-linux-amd64 -o clusterctl chmod +x clusterctl sudo mv clusterctl /usr/local/bin/
-
Initialize Cluster API:
clusterctl init
-
Verify the installation:
# Check core components kubectl get pods -n capi-system kubectl get pods -n capi-kubeadm-bootstrap-system kubectl get pods -n capi-kubeadm-control-plane-system # Verify CRDs kubectl get crds | grep cluster.x-k8s.io
-
Download and apply the installer:
# Latest stable release curl -LO https://github.com/appthrust/capt/releases/latest/download/capt.yaml # Or specific version curl -LO https://github.com/appthrust/capt/releases/download/v0.1.9/capt.yaml # Apply the installer kubectl apply -f capt.yaml
-
Verify the installation:
# Check controller pod kubectl get pods -n capt-system # Verify CAPT CRDs kubectl get crds | grep infrastructure.cluster.x-k8s.io
Expected CRDs:
- captclusters.infrastructure.cluster.x-k8s.io
- captcontrolplanes.controlplane.cluster.x-k8s.io
- captcontrolplanetemplates.controlplane.cluster.x-k8s.io
- captmachinedeployments.infrastructure.cluster.x-k8s.io
- captmachines.infrastructure.cluster.x-k8s.io
- captmachinesets.infrastructure.cluster.x-k8s.io
- captmachinetemplates.infrastructure.cluster.x-k8s.io
- workspacetemplateapplies.infrastructure.cluster.x-k8s.io
If you encounter image pull errors (ErrImagePull or ImagePullBackOff):
-
Check image accessibility:
# Check pod status kubectl get pods -n capt-system # Check detailed events kubectl describe pod -n capt-system <pod-name>
-
For authentication errors:
- Ensure the GitHub Container Registry package is set to public
- Or verify proper authentication credentials are configured
-
If needed, recreate the pod:
kubectl delete pod -n capt-system -l control-plane=controller-manager
After successful installation, you can:
- Create EKS clusters
- Manage infrastructure using WorkspaceTemplates
- Use ClusterClass for standardized cluster deployments
For detailed usage instructions, refer to the main README.md.