The CloudStack provider for Cluster API (CAPC) recently released versions v0.6.0 and v0.6.1. These updates significantly enhance networking capabilities by introducing Virtual Private Cloud (VPC) support, enabling routed Networks, making Network and VPC offerings configurable, and allowing the attachment of multiple Network Interface Cards (NICs) to Nodes. Version v0.6.1 also includes a crucial update to the CloudStack Go SDK.
This post details the key features and improvements introduced in these releases. These releases primarily focus on enhancing the networking capabilities of the CloudStack provider, alongside necessary maintenance updates.
Key Features at a Glance
The key features introduced in these releases are grouped by version:
- 6.0
- VPC Support
- Support for routed Networks
- Make Network and VPC Offering configurable
- 6.1
- Updated CloudStack Go SDK
- Support to attach multiple NICs to Nodes
V0.6.0 Feature Deep Dive
Virtual Private Cloud (VPC) Support
The v0.6.0 release introduces native support for Virtual Private Cloud (VPC) within the CloudStack provider. This feature enables Users to create and manage Clusters inside a VPC, thereby offering enhanced Network isolation and security for Kubernetes Clusters.
User can specify the desired VPC in the CloudStackCluster configuration, as shown below:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta3 kind: CloudStackCluster metadata: name: capc-cluster namespace: default spec: failureDomains: - zone: network: name: cloudstack-network gateway: 10.0.0.1 netmask: 255.255.255.0 vpc: name: cloudstack-vpc cidr: 10.0.0.0/16 ...
If the network and VPC do not exist, the provider will automatically create them using the defined CIDR and gateway configuration. However, if both the VPC and the Network already exist, the provider ignores the specific Network gateway and VPC CIDR configurations.
Support for Routed Networks
The v0.6.0 release incorporates support for routed Networks.
To utilise routed Networks, the User must employ kube-vip to configure a Virtual IP (VIP) on the Nodes within the KubeadmControlPlane specification. When generating the Cluster configuration file, the flavour should be specified as with-kube-vip.
After setting the necessary environment variables, the User executes the following command to generate the Cluster configuration file:
clusterctl generate cluster capc-cluster --flavor with-kube-vip > capc-cluster-spec.yaml
Configurable Network and VPC Offerings
Version v0.6.0 introduces the capability for Users to configure Network and VPC offerings directly within the CloudStackCluster configuration. This allows for greater flexibility in selecting offerings that meet the specific requirements of the Cluster.
Users can specify these offerings as follows:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta3 kind: CloudStackCluster metadata: name: capc-cluster namespace: default spec: failureDomains: - zone: network: name: cloudstack-network gateway: 10.0.0.1 netmask: 255.255.255.0 offering: custom-network-offering vpc: name: cloudstack-vpc cidr: 10.0.0.0/16 offering: custom-vpc-offering ...
If the Network and VPC offerings are omitted, the provider will default to DefaultIsolatedNetworkOfferingWithSourceNatService for the Network and DefaultIsolatedNetworkOfferingForVpcNetworks for the VPC. If the Network and VPC already exist, the provider ignores the defined offering in the CloudStackCluster configuration.
V0.6.1 Feature Deep Dive
Updated CloudStack Go SDK
Version v0.6.1 updates the CloudStack Go SDK to v2.17.1. The new SDK version uses a POST request for communicating with the CloudStack API. This change is necessary because the latest version of the CloudStack API supports only POST requests for specific operations. Consequently, this update ensures that the CloudStack provider remains compatible with the latest CloudStack API and benefits from its enhancements.
Support for Attaching Multiple NICs to Nodes
The v0.6.1 release introduces support for attaching multiple Network Interface Cards (NICs) to Nodes managed by the CloudStack provider. This provides Users with enhanced network connectivity and flexibility by allowing them to configure multiple NICs for their Nodes.
The Networks to be attached are specified in the CloudStackMachineTemplate configuration:
apiVersion: infrastructure.cluster.x-k8s.io/v1beta3 kind: CloudStackMachineTemplate metadata: name: capc-cluster-control-plane namespace: default spec: template: spec: offering: name: Large Instance networks: - name: cloudstack-network # (optional) default primary network; must match with network at failureDomains.zone.network.name ip: 10.1.1.21 # (optional) static IP in the primary network # Additional (extra) networks can be specified below. Use either 'name' or 'id', and optionally an 'ip'. - name: cloudstack-network-2 # (optional) extra network by name ip: 10.1.1.31 # (optional) static IP in this network - id: a1b2c3d4-5678-90ef-gh12-3456789ijklm # (optional) extra network by ID ip: 10.1.1.41 # (optional) static IP in this network
The provider will automatically launch Instances on CloudStack using the specified Networks during the provisioning process.
Conclusion
The v0.6.0 and v0.6.1 releases successfully expanded the core networking capabilities of the CloudStack provider for Cluster API. Key updates included robust support for VPCs, enabling routed Networks, and offering the flexibility to define custom Network and VPC offerings. Furthermore, the introduction of multiple NIC support enhances network flexibility, and the CloudStack Go SDK update ensures continued compatibility with the latest CloudStack API standards.
Additional Information and Resources
Apart from the features above, these releases include various minor bug fixes and improvements.
- For the full changelog of v0.6.0, see: https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/releases/tag/v0.6.0
- For the full changelog of v0.6.1, see: https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/releases/tag/v0.6.1
- To get started with CAPC, check the getting started guide in CAPC’s documentation.
- To upgrade an existing CAPC provider, check CAPI’s upgrade documentation.
Vishesh Jindal is a software engineer at ShapeBlue. He has experience in developing and managing cloud infrastructure. He has a particular interest in databases and has worked extensively on them.
When Vishesh is not working, he enjoys watching anime, playing DOTA, or working on an open-source project.