Deploy User Pod - 2023.1 English

AMD-Xilinx Kubernetes Device Plugin

Release Date
2023.1 English
  1. Confirm U30AllocUnit type, i.e., Card or Device, by issuing the following:

    kubectl describe daemonset device-plugin-daemonset -n kube-system
  2. Paste and customize the content below in a pod-description yaml file:

    apiVersion: v1
    kind: Pod
    name: <pod-name>                           # Choose a unique test pod name
    - name: <container-name>                   # Choose a unique container name
        image: <path-to-docker-image>          # Path to the Docker image on ECR
   1     # Choose resources and numbers in node description
        command: ["/bin/sh"]
        args: ["-c", "while true; do echo hello; sleep 10;done"]

In the above example, the pod has a limit of 1 resource of the kind. Variables set in the daemonset yaml file determine the effective result of this setting.

  • When the U30NameConvention variable is set to CommonName in the daemonset yaml file, the string allows setting resource limits without having to specify an exact U30 firmware version number. This provides backward and forward compatibility of pod-description file.
  • The effective unit for the limit count is determined by the choice of U30AllocUnit in the daemonset yaml file. The allocation unit can be Card or Device.
  • Non-U30 device is not influenced by U30NameConvention/U30AllocUnit setup, device will be registered with exact name and the allocation unit will be the whole card.
  1. Create the pod using the pod-description yaml file:

    kubectl create -f <pod-description.yml>
  2. Check the status of the created pod:

    kubectl get pod -o wide

    You will see a similar report when the pod is successfully deployed on the cluster:

    <pod-name>   1/1     Running   0          1m

    Note: If the pod gets stuck during the container creation process or is being evicted, use the command below to get detailed status information:

    kubectl describe pod <pod-name>
  3. Log into the pod once it is in the running state:

    kubectl exec -it <pod-name> -- /bin/bash
  4. Inside the pod, source the environment and verify that the Xilinx devices are correctly mounted and visible:

    source /opt/xilinx/xrt/
    xbutil examine