Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Release-1.30] - Add vSphere csi/cpi support for v1.30 #6336

Closed
dereknola opened this issue Jul 15, 2024 · 1 comment
Closed

[Release-1.30] - Add vSphere csi/cpi support for v1.30 #6336

dereknola opened this issue Jul 15, 2024 · 1 comment
Assignees

Comments

@dereknola
Copy link
Contributor

Backport fix for Add vSphere csi/cpi support for v1.30

@mdrahman-suse
Copy link
Contributor

Validated with RC v1.30.3-rc4+rke2r1

Environment

  • /etc/rancher/rke2/config.yaml
write-kubeconfig-mode: 644
cloud-provider-name: "rancher-vsphere"
  • pvc.yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: mdrclaim1
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: vsphere-csi-sc
  resources:
    requests:
      storage: 1Gi
  • pod.yaml
apiVersion: "v1"
kind: "Pod"
metadata:
  name: "basic"
  labels:
    name: "basic"
spec:
  nodeSelector:
    kubernetes.io/os: linux
  containers:
    - name: "basic"
      image: ranchertest/mytestcontainer:unprivileged
      ports:
        - containerPort: 8080
          name: "basic"
      volumeMounts:
        - mountPath: "/data"
          name: "pvol"
  volumes:
    - name: "pvol"
      persistentVolumeClaim:
        claimName: "mdrclaim1"

Testing

  • Create a Ubuntu VM in vSphere7
  • Add config and vsphere details
  • Install rke2
  • Ensure the cluster is up
  • Deploy pvc.yaml and pod.yaml attached to pvc
  • Validate pvc attached to instance in vSphere

Validation

$ rke2 -v
rke2 version v1.30.3-rc4+rke2r1 (370f53b3794863b6481adc9a7f5a838d1fca66ac)
go version go1.22.5 X:boringcrypto
$ kgn
NAME      STATUS   ROLES                       AGE   VERSION
md-rke2   Ready    control-plane,etcd,master   41m   v1.30.3+rke2r1

$ kgp
NAMESPACE     NAME                                                    READY   STATUS      RESTARTS      AGE
default       basic                                                   1/1     Running     0             39m
kube-system   etcd-md-rke2                                            1/1     Running     0             41m
kube-system   helm-install-rancher-vsphere-cpi-86cg8                  0/1     Completed   0             41m
kube-system   helm-install-rancher-vsphere-csi-jnr7x                  0/1     Completed   0             41m
kube-system   helm-install-rke2-canal-rp6rb                           0/1     Completed   0             41m
kube-system   helm-install-rke2-coredns-jl9vd                         0/1     Completed   0             41m
kube-system   helm-install-rke2-ingress-nginx-2cljt                   0/1     Completed   0             41m
kube-system   helm-install-rke2-metrics-server-m9575                  0/1     Completed   0             41m
kube-system   helm-install-rke2-snapshot-controller-crd-4tpmz         0/1     Completed   0             41m
kube-system   helm-install-rke2-snapshot-controller-q8qkl             0/1     Completed   1             41m
kube-system   helm-install-rke2-snapshot-validation-webhook-2rwj8     0/1     Completed   0             41m
kube-system   kube-apiserver-md-rke2                                  1/1     Running     0             41m
kube-system   kube-controller-manager-md-rke2                         1/1     Running     0             41m
kube-system   kube-proxy-md-rke2                                      1/1     Running     0             41m
kube-system   kube-scheduler-md-rke2                                  1/1     Running     0             41m
kube-system   rancher-vsphere-cpi-cloud-controller-manager-4xcww      1/1     Running     0             41m
kube-system   rke2-canal-8f6kv                                        2/2     Running     0             41m
kube-system   rke2-coredns-rke2-coredns-64dcf4f58b-njmj2              1/1     Running     0             41m
kube-system   rke2-coredns-rke2-coredns-autoscaler-5749cd7b8b-fn89j   1/1     Running     0             41m
kube-system   rke2-ingress-nginx-controller-v7tsq                     1/1     Running     0             40m
kube-system   rke2-metrics-server-868fc8795f-dblhv                    1/1     Running     0             40m
kube-system   rke2-snapshot-controller-7dcf5d5b46-qmjwt               1/1     Running     0             40m
kube-system   rke2-snapshot-validation-webhook-bf7bbd6fc-4lfnb        1/1     Running     0             40m
kube-system   vsphere-csi-controller-648458cc7f-56l7k                 5/5     Running     0             41m
kube-system   vsphere-csi-controller-648458cc7f-94fmm                 5/5     Running     0             41m
kube-system   vsphere-csi-controller-648458cc7f-v4mxh                 5/5     Running     0             41m
kube-system   vsphere-csi-node-hp7b2                                  3/3     Running     2 (40m ago)   40m
$ k get po,pvc
NAME        READY   STATUS    RESTARTS   AGE
pod/basic   1/1     Running   0          39m

NAME                              STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS     VOLUMEATTRIBUTESCLASS   AGE
persistentvolumeclaim/mdrclaim1   Bound    pvc-f87e3ef9-fcbb-40d4-8781-14e4cc4f9978   1Gi        RWO            vsphere-csi-sc   <unset>                 39m

$ k get pv
NAME                                       CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS   CLAIM               STORAGECLASS     VOLUMEATTRIBUTESCLASS   REASON   AGE
pvc-f87e3ef9-fcbb-40d4-8781-14e4cc4f9978   1Gi        RWO            Delete           Bound    default/mdrclaim1   vsphere-csi-sc   <unset>                          39m

$ helm ls -A | grep rancher
...
rancher-vsphere-cpi             	kube-system	1       	2024-07-24 22:20:11.439589664 +0000 UTC	deployed	rancher-vsphere-cpi-1.8.000             	1.30.1
rancher-vsphere-csi             	kube-system	1       	2024-07-24 22:20:11.277441298 +0000 UTC	deployed	rancher-vsphere-csi-3.3.0-rancher100    	3.3.0-rancher1
Screen Shot 2024-07-24 at 6 14 08 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants