A Kubernetes CAPI Provider
for Apache CloudStack
Peter Motykowski
Sr. Software Development Manager - Customer Engineering
Amazon Web Services (AWS)
SPONSORED BY:
What is Kubernetes Cluster API (CAPI)
• CAPI is a Kubernetes sub-project focused on providing declarative
APIs and tooling to simplify provisioning, upgrading, and operating
multiple Kubernetes clusters.
• The CAPI project uses Kubernetes-style APIs and patterns to
automate cluster lifecycle management for platform operators.
• For more details, see https://cluster-api.sigs.k8s.io/
What is Cluster API for CloudStack (CAPC)?
• CAPC is an infrastructure provider - tasked with managing provider-
specific resources for clusters and machines in CloudStack.
• Uses CloudStack API via cloudstack-go client
• Developed as Open Source and in process of donation to Kubernetes SIG
• Enables the deployment of Kubernetes Clusters to CloudStack managed
resources
Let’s walk through cluster creation
Apache
CloudStack
Kubernetes
Management
Infrastructure
Initialize the Bootstrap Cluster
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
clusterctl init 
--infrastructure cloudstack
Generate a Cluster Manifest
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
Cluster
Manifest
clusterctl generate cluster 
capc-cluster > capc-cluster-spec.yaml
Apply cluster manifest to Bootstrap Cluster
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
Cluster
Manifest
kubectl apply -f 
capc-cluster-spec.yaml
CAPC provisions VMs on CloudStack
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
CAPC CRs
VM
VM
VM
CAPC configures VMs with Kubernetes
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
CAPC CRs
VM
VM
VM
K8s CP
K8s Worker
K8s Worker
Kubernetes processes organize into a cluster
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
CAPC CRs
VM
VM
VM
K8s CP
K8s Worker
K8s Worker
Workload cluster is ready for use
Apache
CloudStack
Kubernetes
Management
Infrastructure
Bootstrap
Cluster
CAPC
Provider
CAPC CRs
VM
VM
VM
K8s CP
K8s Worker
K8s Worker
Let’s see it in action!

A Kubernetes CAPI Provider for Apache CloudStack

  • 1.
    A Kubernetes CAPIProvider for Apache CloudStack Peter Motykowski Sr. Software Development Manager - Customer Engineering Amazon Web Services (AWS)
  • 2.
  • 3.
    What is KubernetesCluster API (CAPI) • CAPI is a Kubernetes sub-project focused on providing declarative APIs and tooling to simplify provisioning, upgrading, and operating multiple Kubernetes clusters. • The CAPI project uses Kubernetes-style APIs and patterns to automate cluster lifecycle management for platform operators. • For more details, see https://cluster-api.sigs.k8s.io/
  • 4.
    What is ClusterAPI for CloudStack (CAPC)? • CAPC is an infrastructure provider - tasked with managing provider- specific resources for clusters and machines in CloudStack. • Uses CloudStack API via cloudstack-go client • Developed as Open Source and in process of donation to Kubernetes SIG • Enables the deployment of Kubernetes Clusters to CloudStack managed resources
  • 5.
    Let’s walk throughcluster creation Apache CloudStack Kubernetes Management Infrastructure
  • 6.
    Initialize the BootstrapCluster Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider clusterctl init --infrastructure cloudstack
  • 7.
    Generate a ClusterManifest Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider Cluster Manifest clusterctl generate cluster capc-cluster > capc-cluster-spec.yaml
  • 8.
    Apply cluster manifestto Bootstrap Cluster Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider Cluster Manifest kubectl apply -f capc-cluster-spec.yaml
  • 9.
    CAPC provisions VMson CloudStack Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider CAPC CRs VM VM VM
  • 10.
    CAPC configures VMswith Kubernetes Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider CAPC CRs VM VM VM K8s CP K8s Worker K8s Worker
  • 11.
    Kubernetes processes organizeinto a cluster Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider CAPC CRs VM VM VM K8s CP K8s Worker K8s Worker
  • 12.
    Workload cluster isready for use Apache CloudStack Kubernetes Management Infrastructure Bootstrap Cluster CAPC Provider CAPC CRs VM VM VM K8s CP K8s Worker K8s Worker
  • 13.
    Let’s see itin action!