Sample Exchange

 View Only

Create CSI Driver vCenter Roles 

Jul 28, 2020 01:10 PM

This script is used to create a new roles on your vCenter server. The newly created role will be filled with the needed permissions for using it with Kubernetes vSphere CSI Driver. The permissions are based on the documentation found here: https://vsphere-csi-driver.sigs.k8s.io/driver-deployment/prerequisites.html
#vCenter
#PowerShell
#Apache2.0
#vSphere
#CSI
#powercli
#vSphere

Statistics
0 Favorited
0 Views
1 Files
0 Shares
2 Downloads
Attachment(s)
zip file
PowerCLI-master.zip   26 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Comments

Aug 03, 2020 07:16 AM

PSSnapins were discontinued more than 3 years ago.
Since PSv4 the module autoload feature takes care of loading the correct modules.
You could use #Requires directives to check the presence of a required module and to verify the minimal PS version.
Something like this for example (at the start of your script).
#Requires -modules 'VMware.VimAutomation.Core'
#Requires -Version 5.1

Jul 28, 2020 03:21 PM

What would you suggest? I literally just wrote a little bit of PowerShell, as that's what I'm confident in, and used another script from a friend with the modifications needed for CSI Driver pre-reqs for the vCenter roles.

Jul 28, 2020 01:56 PM

Thanks for sharing.
But a PSSnapin for a K8s function?!?

Related Entries and Links

No Related Resource entered.