Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Pull Kubevirt Images and Deploy Kubevirt Using a Local Registry

The current Kubevirt release (v0.58.0) doesn't support imagePullSecret. This field-located in a Kubernetes configuration file-tells Kubernetes where to pull credentials from in order to pull images from a secure registry (enterprise-hub.juniper.net/contrail-container-prod/). Juniper Cloud-Native Contrail® Networking™ (CN2) release 22.4 addresses this issue with a workaround for the older Kubevirt release (v048.0) and current release (v0.58.0).
See the following information about how to perform this workaround to pull images and deploy Kubevirt using a local registry.
  1. Install Docker.

  2. Create a local registry.

  3. Edit /etc/docker/daemon.json to add your local registry's ip:port.

  4. Restart Docker.

  5. Download the required containers. These containers are located at Release Userspace CNI - dpdk vhostuser interface support Juniper/kubevirt. The kubevirt-operator.yaml and kubevirt-cr.yaml are also located at this repository.

  6. Load the required containers.

  7. Tag and push the containers to your local registry.

    Replace <LOCAL_REGISTRY> with your local registry. For example, if the containers are hosted at 10.84.13.52:5000/kubevirt, replace <LOCAL_REGISTRY> with 10.84.13.52:5000/kubevirt.

  8. Download the kubevirt-operator.yaml and kubevirt-cr.yaml.

  9. Modify the kubevirt-operator.yaml.

    Replace <LOCAL_REGISTRY> with your local registry. For example, if the containers are hosted at 10.84.13.52:5000/kubevirt, replace <LOCAL_REGISTRY> with 10.84.13.52:5000/kubevirt.

  10. Modify /etc/crio/crio.conf in all Kubernetes nodes in the cluster. Add the following to the crio.conf in all of the Kubernetes nodes in the cluster. These commands allow cri-o (Container Runtime Interface-Open Container Initiative) to pull images from your local registry.

    Note:

    The cri-o service is a version of the Kubernetes container runtime interface (CRI) that enables the use of Open Container Initiative (OCI) compatible runtimes.

  11. After modifying the crio.conf, restart the service.