rancher / rancher-docs

Rancher Documentation
https://ranchermanager.docs.rancher.com/
Apache License 2.0
59 stars 204 forks source link

[Rancher2] Document vSphere Out Of Tree on an RKE Local cluster #104

Open sowmyav27 opened 3 years ago

sowmyav27 commented 3 years ago

Related issue: https://github.com/rancher/rancher/issues/31839

bmdepesa commented 3 years ago

Most of the existing Rancher documentation is the same regarding vSphere versions, checks between steps, etc.. the only big difference is how we install the charts.

Fresh Installs

Set the external cloud provider on the cluster yaml and run rke up

cloud_provider:
    name: external

Add the charts repo to helm and update

helm repo add rancher-charts http://charts.rancher.io/
helm repo update

Install the charts by passing the vCenter information to the chart options. Users can view the values.yaml for any advanced configuration. If users wish to set the configuration secrets/configmaps themselves rather than having the chart generate them, they can follow the official documentation and set the generate flags on the chart install to false: https://vsphere-csi-driver.sigs.k8s.io/driver-deployment/prerequisites.html https://vsphere-csi-driver.sigs.k8s.io/driver-deployment/installation.html

helm install vsphere-cpi rancher-charts/rancher-vsphere-cpi -n kube-system \
--set vCenter.host="" \
--set vCenter.datacenters="" \
--set vCenter.username="" \
--set vCenter.password="" \
--set vCenter.credentialsSecret.generate=false # set to false if configuring manually (default true) 

helm install vsphere-csi rancher-charts/rancher-vsphere-csi -n kube-system \
--set vCenter.host="" \
--set vCenter.datacenters="" \
--set vCenter.username="" \
--set vCenter.password=""\
--set vCenter.clusterId="" \
--set storageClass.datastoreURL="" \
--set vCenter.configSecret.generate=true \ # set to false if configuring manually (default true)
--set csiController.csiResizer.enabled=false #defaults to false, can be enabled if on an environment that supports resizing

Migration

Steps for migration are also similar

Tejeev commented 3 years ago

@bmdepesa Just checking but those Migration steps are for in tree -> out of tree, right?

bmdepesa commented 3 years ago

@Tejeev yes from in-tree -> out-of-tree

Initial configuration has the in-tree cloud provider information defined in the cluster yaml.

The migration steps are the same as outlined in Rancher docs, the only difference is in how we update the charts and edit the cluster -- taint the nodes manually or via the script provided in the Rancher docs, then install the charts w/ the CSI migration flag enabled, and update the cluster yaml and update the cluster with RKE.

obiordu commented 3 years ago

A fresh install:

To make this work for my environment, i needed to check that the providerID is set after deploying the CPI using: kubectl get nodes -o json | jq '.items[]|[.metadata.name, .spec.providerID, .status.nodeInfo.systemUUID]' OR kubectl describe nodes | grep "ProviderID"

If the output for providerID is null, then the kubernetes node object needs to be patched for all the nodes individually before deploying the CSI for the storageClass, PV and PVC to work/bind: kubectl patch node -p "{"\"spec\":{\"providerID\":\"vsphere://nnnnnnnn-nnnn-nnnn-nnnn-nnnnnnnnnnnn\"}}"

https://github.com/rancher/rancher/issues/18949#issuecomment-648256475

github-actions[bot] commented 1 year ago

This repository uses an automated workflow to automatically label issues which have not had any activity (commit/comment/label) for 90 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the workflow can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the workflow will automatically close the issue in 30 days. Thank you for your contributions.