executable_k3d-kubevirt.sh 758 B

1234567891011121314151617
  1. #!/usr/bin/env bash
  2. set -x
  3. k3d cluster create -p "30022:30022@agent:0" --agents 2 --volume /var/run/kubevirt:/var/run/kubevirt:shared cluster1
  4. export KV_RELEASE=v0.55.0
  5. kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${KV_RELEASE}/kubevirt-operator.yaml
  6. kubectl apply -f https://github.com/kubevirt/kubevirt/releases/download/${KV_RELEASE}/kubevirt-cr.yaml
  7. # wait until all KubeVirt components are up
  8. kubectl -n kubevirt wait kv kubevirt --for condition=Available
  9. export CDI_RELEASE=v1.52.0
  10. kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_RELEASE/cdi-operator.yaml
  11. kubectl apply -f https://github.com/kubevirt/containerized-data-importer/releases/download/$CDI_RELEASE/cdi-cr.yaml