WCPCTL
kubectl
vSphere 7 with Kubernetes brings some amazing features that enable you to run K8s nativly on your compute clusters. While the product is amazing, currently most of the interaction to the platform is limited to interaction with the vCenter UI. While the user interactions are minimal, the thought process for this project was to perform those interactions thru a CLI tool. If its a CLI tool, why not make it kubectl style, with simple, user friendly yaml files to provide the configurations and JSON style outputs??
yaml
Some guidance inspired from the awesome work of vthinkbeyondvm.com
pip3 install -U PyYAML
pip3 install requests
wcpctl
chmod +x wcpctl.py
sample-config-yaml
wcpctl.py
sudo cp wcpctl.py /usr/local/bin
$ wcpctl.py -h ============================================================================= usage: wcpctl.py [-h] [--version] {create,apply,delete,describe} ... wcpctl controls for managing Supervisor Clusters in vSphere 7 with K8s. Uses YAML configuration files to setup and manage the Supervisor Cluster. Find additional information at: https://github.io/papivot/wcpctl positional arguments: {create,apply,delete,describe} Commands create Create WCP object(s) apply Apply configuration changes to WCP object(s) delete Delete WCP object(s) describe Describe a WCP object(s) optional arguments: -h, --help show this help message and exit --version show program's version number and exit
wcp-cluster.yaml
wcpctl.py create some-wcp-cluster-config.yaml -u administrator@vsphere.local
wcpctl.py delete some-wcp-cluster-config.yaml
wcpctl.py apply some-namespaceconfig.yaml
wcpctl.py create some-regconfig.yaml
wcpctl.py describe some-nsconfigfile.yaml
wcpctl.py create some-contentlibconfigfile.yaml
Would love feedback from users.