Monday, July 8, 2024

What’s new in CAPC v0.5.0

Kubernetes Cluster API Provider for CloudStack (CAPC) enables users to create and manage Kubernetes clusters on Apache CloudStack using the Kubernetes Cluster API (CAPI).

The newly released CAPC v0.5.0 introduces numerous new capabilities and improvements. Some of the key features include:

  • CAPC as unmanaged CKS clusters: Enhanced integration of CAPC with CloudStack Kubernetes Service.
  • Project Support: Allows deploying CAPC Kubernetes clusters in CloudStack projects.
  • Enable CAPC for Regular Users: Enable regular user accounts to create CAPC clusters, expanding accessibility.

CAPC as unmanaged CKS clusters

When a Kubernetes cluster is created using CAPC, CloudStack is unaware of the resources provisioned. With this feature, users can register their CAPC clusters as externally managed CKS clusters that provides a comprehensive view of the CAPC resources deployed on CloudStack.

How to enable CAPC as unmanaged CKS cluster

Before initializing the cluster for the first time, run:

export CAPC_CLOUDSTACKMACHINE_CKS_SYNC=true

After that initialize the CAPC cluster using the following command:

clusterctl init --infrastructure cloudstack
If you have already initialized the CAPC cluster, just add the following arguments to the capc-controller-manager deployment spec:
....
    spec:
      containers:
      - args:
        - --leader-elect
        - --metrics-bind-addr=0.0.0.0:8080
        - --cloudstackcluster-concurrency=10
        - --cloudstackmachine-concurrency=10
        - --enable-cloudstack-cks-sync=true  <---- Set this to true to enable syncing with CKS
....

This will enable the controller which is responsible for syncing CAPC resources of a cluster with CloudStack.

To enable syncing for a CAPC cluster with CKS, syncWithACS needs to be set to true in the CloudStackCluster spec. Alternatively, you can run the following command before generating the spec for a cluster using the clusterctl generate cluster command.

export CLOUDSTACK_SYNC_WITH_ACS=true

 

  • CloudStackCluster spec file sample:

apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
kind: CloudStackCluster
metadata:
  name: capc-cluster
  namespace: default
spec:
  syncWithACS: true  <—- Set this to true to enable syncing with CKS
  controlPlaneEndpoint:
    host: 10.0.53.55
    port: 6443
  failureDomains:
  acsEndpoint:
      name: cloudstack-credentials
      namespace: default
    name: failure-domain-1
    zone:
      name: ref-trl-6773-k-M7-vishesh-jindal
      network:
        name: GuestNet1

 

Once the cluster is setup, you will see an entry in the Kubernetes Dashboard in CloudStack. You can check different details related to the CAPC cluster in this view.




An externally managed CKS cluster also enables the user to clean up the resources associated with a CAPC in the event the management cluster is deleted, and the resources are left uncleared. Then click on Ok button. This will cleanup all the instances related to this CAPC cluster.

 

 

 

 

Project Support

CAPC v0.5.0 allows for the creation of a cluster within a CloudStack project. To create a CAPC cluster within a project, the user needs to specify the project name in the CloudStackCluster spec file. Here’s a sample manifest for specifying the project:

apiVersion: infrastructure.cluster.x-k8s.io/v1beta3
kind: CloudStackCluster
metadata:
  name: capc-cluster
  namespace: default
spec:

  syncWithACS: true
  controlPlaneEndpoint:
    host: 10.0.53.55
    port: 6443
  failureDomains:
  acsEndpoint:
      name: cloudstack-credentials
      namespace: default
    name: failure-domain-1
    project: capc-cluster <—- Set the project name here
    zone:
      name: ref-trl-6773-k-M7-vishesh-jindal
      network:
        name: GuestNet1

 

Enable CAPC for Regular Users

Previously, only CloudStack admin and domain admin users were able to create a CAPC cluster. Starting with v0.5.0, CAPC cluster creation has been extended to all account types including regular user accounts.

 

Changelog

This release includes many new features and enhancements. For full changelog, see: https://github.com/kubernetes-sigs/cluster-api-provider-cloudstack/releases/tag/v0.5.0

 

Getting Started with the New Release

If you want to start with CAPC, check out the getting started guide in the CAPC’s documentation.

If you already have a CAPC provider set up and want to upgrade to the new release, check CAPI’s upgrade documentation.

The post What’s new in CAPC v0.5.0 appeared first on ShapeBlue.



from CloudStack Consultancy & CloudStack... https://ift.tt/PiVZHE6
via IFTTT

No comments:

Post a Comment