Hello Bharat,
1- When you deploy a cluster, an additional user is created under your
cloudstack account - i.e <account_name>-kubeadmin, and apikey and secret key
of this kubeadmin user is pushed to the cluster.
This you can find -
root@18dc14302a2:~# kubectl get secret cloudstack-secret -n kube-system
NAME TYPE DATA AGE
cloudstack-secret Opaque 1 3d5h
To check the more details for this secret -
root@18dc14302a2:~# kubectl get secret cloudstack-secret -n kube-system -o
jsonpath='{.data.*}' | base64 -d
[Global]
api-url = http://172.27.2.53:8080/client/api
api-key =
ex0HfJJt7YQES4n5dsD3AEL-gr0n__JbfRvfK6cyUi5dbdPx7hyOckJ_enInYOyRewI0IR772KyNY8Sjh0TOdg
secret-key =
IEHR45EK8GHkNo1G5t7eZSw5MARfZcYUvYXR1mR_vn2vv3b_-nQYFt_A_xZWRc4udtPQPKWjWW8kvTnSccAglA
Now, you can see the API URL, so this URL endpoint must be reachable from your
cluster in order to provision PVC. This URL you can put in the global setting -
(endpoint.url)
So I am assuming this endpoint URL is reachable from your cluster - you don’t
need to define anything in the cloud-config and secret - because secret is
already created and pushed from cloudstack once you deploy the cluster. ( From
above steps you can verify ).
2- Deploy the CSI driver - as mentioned in the Link -
kubectl apply -f
https://github.com/apalia/cloudstack-csi-driver/releases/latest/download/manifest.yaml
3- Now create the storage class - as mentioned in the Link as example
<https://github.com/apalia/cloudstack-csi-driver/blob/master/examples/k8s/0-storageclass.yaml>
Create a file i.e storage-class.yml and paste below information - ( Please
mention the disk offering ID, it has to be a CUSTOM )
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: cloudstack-custom
provisioner: csi.cloudstack.apache.org
reclaimPolicy: Delete
volumeBindingMode: WaitForFirstConsumer
allowVolumeExpansion: false
parameters:
csi.cloudstack.apache.org/disk-offering-id: <copy-the-disk-offering-id-here>
kubectl apply -f storage-class.yml
root@18dc14302a2:~# kubectl get storageclass
NAME PROVISIONER RECLAIMPOLICY
VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
cloudstack-custom csi.cloudstack.apache.org Delete
WaitForFirstConsumer false 3d5h
4- Now you can test by creating a PVC and POD - ( Examples are already there in
the link -
https://github.com/apalia/cloudstack-csi-driver/tree/master/examples/k8s )
Vivek Kumar
Sr. Manager - Cloud & DevOps
TechOps | Indiqus Technologies
[email protected] <mailto:[email protected]>
www.indiqus.com <https://www.indiqus.com/>
> On 22-Feb-2024, at 8:11 PM, Bharat Bhushan Saini
> <[email protected]> wrote:
>
> Hi Vivek/Kiran,
>
> The cluster is deployed in the Root domain. But I am unable to locate
> cloud-config file configuration after creating a domain user and pls correct
> me that the cloud-config file have to be configured in controller node.
>
> Thanks and Regards,
> Bharat Saini
>
>
>
> From: Vivek Kumar <[email protected]
> <mailto:[email protected]>>
> Date: Thursday, 22 February 2024 at 5:51 PM
> To: [email protected] <mailto:[email protected]>
> <[email protected] <mailto:[email protected]>>
> Subject: Re: CKS Storage Provisioner Info
>
> EXTERNAL EMAIL: Please verify the sender email address before taking any
> action, replying, clicking any link or opening any attachment.
>
>
> Hello Bharat,
>
> Yes, the link provided by Kiran works well for PVC but only one caveat that
> it only works if your cluster is deployed under ROOT domain.
>
>
>
> Vivek Kumar
> Sr. Manager - Cloud & DevOps
> TechOps | Indiqus Technologies
>
> [email protected] <mailto:[email protected]>
> <mailto:[email protected]>
> www.indiqus.com <http://www.indiqus.com/> <https://www.indiqus.com/>
>
>
>
>
> > On 22-Feb-2024, at 5:21 PM, Kiran Chavala <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > Hi Bharat
> >
> > You can try the following CSI driver
> >
> > https://github.com/Leaseweb/cloudstack-csi-driver
> >
> >
> > Regards
> > Kiran
> >
> > From: Bharat Bhushan Saini <[email protected]
> > <mailto:[email protected]>>
> > Date: Thursday, 22 February 2024 at 5:14 PM
> > To: [email protected] <mailto:[email protected]>
> > <[email protected] <mailto:[email protected]>>
> > Subject: CKS Storage Provisioner Info
> > Hi All,
> >
> > As working with the CKS service I had a query regarding with the K8s
> > storage provisioner.
> > Which provisioner I can use for the shared and unshared PVC in the CKS
> > service.
> > Please support in this, it will be great help for me.
> >
> > Thanks and Regards,
> > Bharat Saini
> >
> > [signature_1218208545]
> >
> > --------------------------- Disclaimer: ------------------------------
> > This message and its contents are intended solely for the designated
> > addressee and are proprietary to Kloudspot. The information in this email
> > is meant exclusively for Kloudspot business use. Any use by individuals
> > other than the addressee constitutes misuse and an infringement of
> > Kloudspot's proprietary rights. If you are not the intended recipient,
> > please return this email to the sender. Kloudspot cannot guarantee the
> > security or error-free transmission of e-mail communications. Information
> > could be intercepted, corrupted, lost, destroyed, arrive late or
> > incomplete, or contain viruses. Therefore, Kloudspot shall not be liable
> > for any issues arising from the transmission of this email.
> >
> >
> >
>
>
> --
> This message is intended only for the use of the individual or entity to
> which it is addressed and may contain confidential and/or privileged
> information. If you are not the intended recipient, please delete the
> original message and any copy of it from your computer system. You are
> hereby notified that any dissemination, distribution or copying of this
> communication is strictly prohibited unless proper authorization has been
> obtained for such action. If you have received this communication in error,
> please notify the sender immediately. Although IndiQus attempts to sweep
> e-mail and attachments for viruses, it does not guarantee that both are
> virus-free and accepts no liability for any damage sustained as a result of
> viruses.
> --------------------------- Disclaimer: ------------------------------
> This message and its contents are intended solely for the designated
> addressee and are proprietary to Kloudspot. The information in this email is
> meant exclusively for Kloudspot business use. Any use by individuals other
> than the addressee constitutes misuse and an infringement of Kloudspot's
> proprietary rights. If you are not the intended recipient, please return this
> email to the sender. Kloudspot cannot guarantee the security or error-free
> transmission of e-mail communications. Information could be intercepted,
> corrupted, lost, destroyed, arrive late or incomplete, or contain viruses.
> Therefore, Kloudspot shall not be liable for any issues arising from the
> transmission of this email.
>
--
This message is intended only for the use of the individual or entity to
which it is addressed and may contain confidential and/or privileged
information. If you are not the intended recipient, please delete the
original message and any copy of it from your computer system. You are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited unless proper authorization has been
obtained for such action. If you have received this communication in error,
please notify the sender immediately. Although IndiQus attempts to sweep
e-mail and attachments for viruses, it does not guarantee that both are
virus-free and accepts no liability for any damage sustained as a result of
viruses.