A YAML configuration file can be used as part of your desired state repository to configure the resources made available to the default worker node used for Kubernetes workloads.
Currently, memory, CPU and IP address information can be adjusted for the worker node virtual machine.
If there is no worker virtual machine desired state available in the repository assigned to a host, default sizes are used of 2 CPUs and 2Gi Memory.
If there is a worker virtual machine desired state expressed in the git repository, it is merged and it overrides the default information
After the worker virtual machine is created and booted, changes to desired state are not applied to it until the next Edge Compute Stack Host reboot.
Example: Default Worker Node Manifest File
In the following example, we change the number of CPUs to 4 and the Memory to 8 Gi:
# Example of how to change the default kubernetes worker node configuration to provide more memory or CPUs apiVersion: vmoperator.vmware.com/v1alpha1 kind: VirtualMachineClass metadata: name: best-effort-ec-small # No resource requests/reservations. # Memory overcommit possible. spec: # VM operator controller name for VirtualMachine class # is different so addition of controllerName attr with invalid # value makes vm operator ignore this VM CRD instance. # This is majorly done because vm operator doesn't have all the # needed capabilities to deploy ec worker vm. controllerName: vmoperator.vmware.com/ecworker hardware: cpus: 4 memory: 8Gi --- apiVersion: v1 kind: Namespace metadata: name: ec-system --- apiVersion: vmoperator.vmware.com/v1alpha1 kind: VirtualMachine metadata: name: ec-worker namespace: ec-system spec: className: best-effort-ec-small imageName: ec-wrkr.ova powerState: poweredOff vmMetadata: transport: CloudInit
Replacing the Default Photon Worker Node
A default Photon image is provided, which includes multiple device drivers to allow use cases that require USB pass-through of devices attached to the Edge hosts. Custom worker node images can be created and used to replace the existing ec-wrkr.ova file provided.
To customize your worker node image, follow the steps outlined in the preceding example and replace the ec-wrkr.ova
file on the root of the USB/Customized ISO with exactly the same file name.