2 Replies Latest reply on Jun 12, 2019 2:38 PM by daphnissov

    Optimize-VMwarePKS: A PowerShell Script for All Your VMware PKS Deployment Needs

    daphnissov Guru
    Community WarriorsvExpert

      Glad to kick this community off with a helpful PowerShell script designed to assist PKS customers by providing organization of their deployments in their vSphere environment with ease.

       

      Optimize-VMwarePKS: A PowerShell Script for All Your VMware PKS Deployment Needs

        • 1. Re: Optimize-VMwarePKS: A PowerShell Script for All Your VMware PKS Deployment Needs
          drfooser Lurker

          Hello Daphnissov,

          My team has deployed Pivotal Container Service/BOSH over VMware and could really use this script. I am a little hesitant though since it looks as if it runs against every SDDC in the vCenter.

          Is there a way to limit the scope of the script to run against a single SDDC?

           

          Since our PKS lab SDDC is on the same vCenter as our production environment I'm also interested in connecting with anyone who can speak to the risks, if any, of running the script.

          • 2. Re: Optimize-VMwarePKS: A PowerShell Script for All Your VMware PKS Deployment Needs
            daphnissov Guru
            vExpertCommunity Warriors

            Hello drfooser

            When you say

             

            Is there a way to limit the scope of the script to run against a single SDDC?

            are you talking about limiting the scope to a Datacenter object within vCenter? I gather you have two separate Enterprise PKS installations pointed to the same vCenter but under different datacenter objects. If that's the case, I could take this as a feature enhancement to add to my backlog. Alternatively, you're welcome to clone my repo and submit a pull request.

             

            As to the safety of running this, it is in use by many different customers at this point (including VMware and Pivotal internally) and I have not heard of a single issue thus far. This script makes no alterations to VMs themselves other than setting tags (if you request it to do so). As far as removal of items, it only does this on parent objects which you define and doesn't scour your vCenter to remove anything else. Again, that functionality is entirely optional and can be enabled on a per item basis. Lastly and obviously, the code is available for review on my repo as linked above, so you are welcome to inspect every last line. Alternatively, you could bring up one of the two (at this time of writing) PKS Hands-On-Labs and paste in the code to run it in their sandboxed environment first. There you can play with the various switches to determine its efficacy and safety.