Getting started with CAPL
Prerequisites
- A Linode account
- A Personal Access Token (PAT) created via the Linode Cloud Manager.
Make sure to create the token with at least the following read/write permissions (or "all"):
- Linodes
- NodeBalancers
- Images
- Volumes
- VPCs
- IPs
- Object Storage
- clusterctl is installed
- Cluster API management cluster is created
For more information please see the Linode Guide.
Setting up your cluster environment variables
Once you have provisioned your PAT, save it in an environment variable along with other required settings:
export LINODE_REGION=us-ord
export LINODE_TOKEN=<your linode PAT>
export LINODE_CONTROL_PLANE_MACHINE_TYPE=g6-standard-2
export LINODE_MACHINE_TYPE=g6-standard-2
For Regions and Images that do not yet support Akamai's cloud-init datasource CAPL will automatically use a stackscript shim to provision the node. If you are using a custom image ensure the cloud_init flag is set correctly on it
By default, clusters are provisioned within VPC. For Regions which do not have VPC support yet, use the VPCLess flavor to have clusters provisioned.
Register linode as an infrastructure provider
- Add
linode
as an infrastructure provider in~/.cluster-api/clusterctl.yaml
providers: - name: linode-linode url: https://github.com/linode/cluster-api-provider-linode/releases/latest/infrastructure-components.yaml type: InfrastructureProvider
Install CAPL on your management cluster
Install CAPL and enable the helm addon provider which is used by the majority of the CAPL flavors
clusterctl init --infrastructure linode-linode --addon helm
Deploying your first cluster
Please refer to the default flavor section for creating your first Kubernetes cluster on Linode using Cluster API.