This guide provides steps to deploy the Kubevirt DRA Driver on your Kubernetes cluster.
- A running KubeVirtCI following this guide
kubectl
installed and configured to interact with your cluster
- Set the
KUBECONFIG
environment variable:
export KUBECONFIG=$(/path/to/your/ci/directory/kubeconfig.sh)
- Apply the Custom Resource Definitions (CRDs):
kubectl apply -f ../deployments/native/kubevirt-dra-driver/crds/nas.pci.resource.kubevirt.io_nodeallocationstates.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/crds/pci.resource.kubevirt.io_pciclaimparameters.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/crds/pci.resource.kubevirt.io_pciclassparameters.yaml
- Apply other Kubernetes objects:
kubectl apply -f ../deployments/native/kubevirt-dra-driver/templates/serviceaccount.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/templates/clusterrole.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/templates/clusterrolebinding.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/templates/resourceclass.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/templates/controller.yaml
kubectl apply -f ../deployments/native/kubevirt-dra-driver/templates/kubeletplugin.yaml
- Apply the demo Pod:
kubectl apply -f ../demo/pci-test1.yaml
- Verify that the Pod is running:
kubectl get pods -A
- Verify that the Pod has the PCI device assigned:
kubectl exec -it <test-pod> -- lspci
```bash