The kubectl vsphere container is here

Do you want to run kubectl vsphere commands from a container? Do you want to be able to specify containers and also call the VM Service in the same YAML file? Well you have come to the right place. I built a simple container that takes 5 variables and sends it to kubectl vsphere in a container.


  • vSphere 7.0.2 with Workload Management Deployed see guides here
  • A namespace deployed and the VM Service Configured see guide here
  • A working template configured and tested that it deploys see guide here
  • A quite place where you will not be interrupted see my guide here

Clone my Git repository locally

change to the kubectlsvspherecontainer directory

cd kubectlsvspherecontainer

Edit the docker file and enter your Tanzu API server url or address

Build the docker image

docker build -t kubectlvsphere .

Run the container with five inputs

docker run kubectlvsphere serveraddress username password namespace locationofyamlfile

docker run kubectlvsphere jenkins@vsphere.local VMware1! tanzu

You can easily modify this container by editing the file to your needs then rebuilding the container


Remember sharing is caring!

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.