The below example shows how Host groups can be used to deploy Kubernetes workloads. This requires a camera attached to a device to receive the workload that monitors feed from that device.

Procedure

  1. Open the VMware Edge Compute Stack Service from the URL provided to you when registering.
  2. Go to the Configure/Hosts page in the VMware Edge Compute Stack service and select the hosts for which you want to create a group.
  3. Click ADD HOST TO GROUP.
  4. Provide the required details:

    Option

    Description

    Group Description

    Enter a description for the host group.

    Group Label Key

    Enter a label key.

    Group Label Value

    Enter a label value.

    The following is an example:

    Figure 1. Example Host Group Creation
  5. Click OK.

    The group is sent to the host (or hosts) and activated for use.

  6. In the deployment details, within your application specification, you can use this group as a nodeSelector to deploy only to hosts that have the label of cameraattached.

    Example deployment specification showing nodeSelector:

    apiVersion: apps/v1
    kind: Deployment
    ...
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: camera-app
      strategy:
        type: Recreate
      template:
        metadata:
          labels:
            app: camera-app
        spec:
          nodeSelector:
            cameraattached: "true"
          containers:
            ...