The Kubernetes Image Puller can be installed using Helm.

Prerequisites
  • The helm binary

  • An OpenShift or Kubernetes cluster to install to

  • The oc or the kubectl binary

    In the instructions below, use the oc command when installing on OpenShift and the kubectl command for installing on Kubernetes.

The following parameters are available for configuring the installation with Helm:

Table 1. Parameters for installing with Helm
Value Usage Default

appName

The value of DAEMONSET_NAME to be set in the ConfigMap

kubernetes-image-puller

image.repository

The repository to pull the image from

quay.io/eclpise/kubernetes-image-puller

image.tag

The image tag to pull

latest

serviceAccount.name

The name of the ServiceAccount to create

k8s-image-puller

configMap.name

The name of the ConfigMap to create

k8s-image-puller

configMap.cachingIntervalHours

The value of CACHING_INTERVAL_HOURS to be set in the ConfigMap

"1"

configMap.cachingMemoryRequest

The value of CACHING_MEMORY_REQUEST to be set in the ConfigMap

"10Mi"

configMap.cachingMemeryLimit

The value of CACHING_MEMORY_LIMIT to be set in the ConfigMap

"20Mi"`

configMap.nodeSelector

The value of NODE_SELECTOR to be set in the ConfigMap

"{}"

Procedure

Installing

  1. Clone the kubernetes-image-puller repository:

    $ git clone https://github.com/che-incubator/kubernetes-image-puller
    $ cd kubernetes-image-puller
  2. Create a namespace to deploy the puller into:

    $ oc create namespace k8s-image-puller
  3. Run helm install:

    $ helm install kubernetes-image-puller --namespace k8s-image-puller deploy/helm

    To set values, edit the deploy/helm/values.yaml file, or use the --set property.name=<value> parameter.

Verifying the installation

  1. Confirm that a new deployment, kubernetes-image-puller, and a DaemonSet (named based on the value of the DAEMONSET_NAME parameter) exist. The DaemonSet needs to have a Pod for each node in the cluster:

    $ oc get deployment,daemonset,pod --namespace k8s-image-puller
    NAME                                      READY   UP-TO-DATE   AVAILABLE   AGE
    deployment.apps/kubernetes-image-puller   1/1     1            1           4m21s
    
    NAME                                     DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
    daemonset.apps/kubernetes-image-puller   3         3         3       3            3           <none>          3m40s
    
    NAME                                          READY   STATUS    RESTARTS   AGE
    pod/kubernetes-image-puller-b556c8bd4-qxwwl   1/1     Running   0          4m21s
    pod/kubernetes-image-puller-glh87             3/3     Running   0          3m40s
    pod/kubernetes-image-puller-h7lxf             3/3     Running   0          3m40s
    pod/kubernetes-image-puller-nrt6p             3/3     Running   0          3m40s
  2. Check that the ConfigMap named k8s-image-puller has the values specified in the Helm configuration, or that they contain the default values:

    $ oc get configmap k8s-image-puller --output yaml
    apiVersion: v1
    data:
      CACHING_INTERVAL_HOURS: "1"
      CACHING_MEMORY_LIMIT: 20Mi
      CACHING_MEMORY_REQUEST: 10Mi
      DAEMONSET_NAME: kubernetes-image-puller
      IMAGES: java11-maven=quay.io/eclipse/che-java11-maven:nightly; che-theia=eclipse/che-theia:next;
        java-plugin-runner=eclipse/che-remote-plugin-runner-java8:latest;
      NAMESPACE: k8s-image-puller
      NODE_SELECTOR: '{}'
    kind: ConfigMap
    metadata:
      creationTimestamp: "2020-02-17T22:15:22Z"
      name: k8s-image-puller
      namespace: k8s-image-puller
      resourceVersion: "3078"
      selfLink: /api/v1/namespaces/k8s-image-puller/configmaps/k8s-image-puller
      uid: 71bc5ce4-d095-468e-ab7b-23c1e0a36638