vSphere Cloud Provider
- Canonical Kubernetes
Channel | Revision | Published | Runs on |
---|---|---|---|
latest/stable | 58 | 04 Sep 2024 | |
latest/candidate | 56 | 15 Apr 2024 | |
latest/beta | 58 | 14 Aug 2024 | |
latest/edge | 59 | 22 Oct 2024 | |
1.32/edge | 59 | 22 Oct 2024 | |
1.31/stable | 58 | 04 Sep 2024 | |
1.31/beta | 58 | 13 Aug 2024 | |
1.31/edge | 57 | 03 Aug 2024 | |
1.30/stable | 54 | 11 Jul 2024 | |
1.30/beta | 54 | 19 Apr 2024 | |
1.30/edge | 54 | 13 Mar 2024 | |
1.29/stable | 56 | 17 Apr 2024 | |
1.29/candidate | 56 | 15 Apr 2024 | |
1.29/beta | 54 | 17 Apr 2024 | |
1.29/edge | 54 | 16 Dec 2023 | |
1.28/stable | 50 | 22 Aug 2023 | |
1.28/candidate | 49 | 07 Jun 2023 | |
1.28/beta | 50 | 08 Aug 2023 | |
1.28/edge | 52 | 09 Aug 2023 | |
1.27/stable | 49 | 12 Jun 2023 | |
1.27/candidate | 49 | 12 Jun 2023 | |
1.27/beta | 47 | 17 Apr 2023 | |
1.27/edge | 46 | 17 Apr 2023 | |
1.26/stable | 37 | 20 Mar 2023 | |
1.26/candidate | 37 | 16 Mar 2023 | |
1.26/beta | 24 | 09 Apr 2023 | |
1.26/edge | 24 | 16 Nov 2022 | |
1.25/stable | 23 | 30 Sep 2022 | |
1.25/candidate | 23 | 28 Sep 2022 | |
1.25/beta | 25 | 01 Dec 2022 | |
1.25/edge | 15 | 27 Aug 2022 |
juju deploy vsphere-cloud-provider
Deploy universal operators easily with Juju, the Universal Operator Lifecycle Manager.
Platform:
This charm encapsulates the out-of-tree Kubernetes vSphere Cloud Provider, including both the Cloud Provider Interface (CPI) and the Container Storage Interface (CSI) components along with related lifecycle operations.
This charm is built using the charmcraft ops framework.
Deployment
This charm is not functional when deployed by itself. It requires an existing Kubernetes cluster as well as the vsphere-integrator charm installed and trusted in a Juju vSphere environment. By default, the vsphere-integrator charm will enable vsphere capabilities using the in-tree cloud provider. However, it is recommended to use the out-of-tree provider for more control of CPI/CSI configuration and maintenance.
Deployment requires the vsphere-integrator and a few relations:
- Existing Deployment
juju deploy vsphere-cloud-provider
# removes in-tree provider
juju remove-relation vsphere-integrator:clients kubernetes-control-plane
juju remove-relation vsphere-integrator:clients kubernetes-worker
# configures out-of-tree provider
juju relate vsphere-cloud-provider:certificates easyrsa
juju relate vsphere-cloud-provider:kube-control kubernetes-control-plane
juju relate vsphere-cloud-provider:external-cloud-provider kubernetes-control-plane
juju relate vsphere-cloud-provider vsphere-integrator:clients
## wait for the vsphere controller daemonset to be running
kubectl get ds -n kube-system
- New Deployment
juju deploy charmed-kubernetes
juju deploy vsphere-integrator --trust
juju deploy vsphere-cloud-provider
juju relate vsphere-cloud-provider:certificates easyrsa
juju relate vsphere-cloud-provider:kube-control kubernetes-control-plane
juju relate vsphere-cloud-provider:external-cloud-provider kubernetes-control-plane
juju relate vsphere-cloud-provider vsphere-integrator
## wait for the vsphere controller daemonset to be running
kubectl get ds -n kube-system
This will deploy the most recent vsphere cloud-provider and vsphere csi-driver supported by the charm. See all supported versions with:
juju run-action vsphere-cloud-provider/leader --wait list-versions
Resources Created
Deployment of this charm provides a storage class that can be used to create PVs or PVCs on your vsphere cluster.
For a list of all kubernetes resources installed by this charm, run the following:
juju run-action vsphere-cloud-provider/leader --wait list-resources
Examples
Creating a pod with a PersistentDisk-backed volume
This script creates a busybox pod with a persistent volume claim backed by vSphere’s PersistentDisk.
#!/bin/bash
# create a persistent volume claim using the charm's storage class
kubectl create -f - <<EOY
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: testclaim
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 100Mi
storageClassName: csi-vsphere-default
EOY
# create the busybox pod with a volume using that PVC:
kubectl create -f - <<EOY
apiVersion: v1
kind: Pod
metadata:
name: busybox
namespace: default
spec:
containers:
- image: busybox
command:
- sleep
- "3600"
imagePullPolicy: IfNotPresent
name: busybox
volumeMounts:
- mountPath: "/pv"
name: testvolume
restartPolicy: Always
volumes:
- name: testvolume
persistentVolumeClaim:
claimName: testclaim
EOY