In Fusion 12.0, vctl utility has an enhancement to support KIND. With this enhancement, KIND can use vctl container instead of Docker container as nodes to run local Kubernetes clusters.
Prerequisites
By default, vctl assigns 2 GB memory for every CRX VM that hosts the vctl container node. Ensure that your Mac machine has 2 GB free memory when running single-node cluster, 4 GB free memory when running two-node cluster. The more nodes configured in your cluster, the more free memory is needed.
Procedure
- On your Mac, open a terminal window.
- Run the vctl system start command to start the vctl container runtime.
This command performs the following tasks:
- Creates a bin folder in the <user home folder>/.vctl folder.
- Downloads kubectl, kind and crx.vmdk files, and saves them to the bin folder.
- Creates a docker link file that points to /Applications/VMware Fusion.app/Contents/Library/vkd/bin/vctl.
- Run vctl kind command.
This command performs the following four tasks:
- Creates a bin folder in the <user home folder>/.vctl folder.
- Downloads kubectl, kind and crx.vmdk files, and saves them to the bin folder.
- Creates a docker link file that points to /Applications/VMware Fusion.app/Contents/Library/vkd/bin/vctl.
-
Creates a vctl-based KIND context by adding <user home folder>/.vctl/bin to the PATH environment variable and makes it the first searchable path.
So in the Terminal window, the kubectl/kind/docker CLI tools in the <user home folder>/.vctl/bin folder will take precedence over other existing versions of these tools that might be installed else where.
- The vctl-based KIND context will be lost if you close the Terminal window.
Next time you want to interact with the Kubernetes clusters, run the vctl kind command.
Note:
- vctl does not support kind build command.
- By default, vctl assigns 2 GB memory and 2 CPU cores for the CRX VM that hosts the node container, you can use the --k8s-cpus and --k8s-mem options of vctl system config command to customize the configurations.
- Each Fusion version supports only a specific version of kind CLI and kubectl CLI tools. For example:
- Fusion 12.0.0 supports kind v0.8.1 and kubectl v1.18.6.
- Fusion 12.1.0 supports kind v0.9.0 and kubectl v1.19.1
The vctl utility in Fusion 12.1.0 introduces a version check for the kind and the kubectl CLI tools. When you run vctl system start or vctl kind command, if the kind and the kubectl CLI tools already exist in <user home folder>/.vctl/bin folder and their versions are supported by current Fusion version, the vctl command will not download the tools again. If their versions are not supported by current Fusion version, the vctl command will download the supported versions of the tools and remove the unsupported ones.